mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
done: make sure the final progress update is made
It would previously be skipped if an existing error was returned, but would lead to a previous value being left there and later used. CURLINFO_TOTAL_TIME for example. Still it avoids that final progress update if we reached DONE as the result of a callback abort to avoid another callback to be called after an abort-by-callback. Reported-by: Lukas Ruzicka Closes #538
This commit is contained in:
parent
bb9ec5ebb2
commit
40c349ada9
@ -6088,8 +6088,13 @@ CURLcode Curl_done(struct connectdata **connp,
|
|||||||
else
|
else
|
||||||
result = status;
|
result = status;
|
||||||
|
|
||||||
if(!result && Curl_pgrsDone(conn))
|
if(CURLE_ABORTED_BY_CALLBACK != result) {
|
||||||
result = CURLE_ABORTED_BY_CALLBACK;
|
/* avoid this if we already aborted by callback to avoid this calling
|
||||||
|
another callback */
|
||||||
|
CURLcode rc = Curl_pgrsDone(conn);
|
||||||
|
if(!result && rc)
|
||||||
|
result = CURLE_ABORTED_BY_CALLBACK;
|
||||||
|
}
|
||||||
|
|
||||||
if((conn->send_pipe->size + conn->recv_pipe->size != 0 &&
|
if((conn->send_pipe->size + conn->recv_pipe->size != 0 &&
|
||||||
!data->set.reuse_forbid &&
|
!data->set.reuse_forbid &&
|
||||||
|
Loading…
Reference in New Issue
Block a user