aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/multi.c2
-rw-r--r--lib/url.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 1fb341ca6..ca975a056 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1610,7 +1610,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
Curl_multi_process_pending_handles(multi);
/* post-transfer command */
- res = Curl_done(&data->easy_conn, CURLE_OK, FALSE);
+ res = Curl_done(&data->easy_conn, data->result, FALSE);
/* allow a previously set error code take precedence */
if(!data->result)
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