aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 770b0cc95..5209c8dce 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5796,9 +5796,9 @@ CURLcode Curl_done(struct connectdata **connp,
if(conn->handler->done)
result = conn->handler->done(conn, status, premature);
else
- result = CURLE_OK;
+ result = status;
- if(Curl_pgrsDone(conn) && !result)
+ if(!result && Curl_pgrsDone(conn))
result = CURLE_ABORTED_BY_CALLBACK;
/* if the transfer was completed in a paused state there can be buffered