mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
multi_runsingle: set timeout error messages
With the latest changes to fix the timeout handling with multi interface we lost the timeout error messages. This patch brings them back.
This commit is contained in:
parent
578e833d3b
commit
397e61128f
13
lib/multi.c
13
lib/multi.c
@ -985,6 +985,19 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||||||
|
|
||||||
if(timeout_ms < 0) {
|
if(timeout_ms < 0) {
|
||||||
/* Handle timed out */
|
/* Handle timed out */
|
||||||
|
if(easy->state == CURLM_STATE_WAITRESOLVE)
|
||||||
|
failf(data, "Resolving timed out after %ld milliseconds",
|
||||||
|
Curl_tvdiff(now, data->progress.t_startsingle));
|
||||||
|
else if(easy->state == CURLM_STATE_WAITCONNECT)
|
||||||
|
failf(data, "Connection timed out after %ld milliseconds",
|
||||||
|
Curl_tvdiff(now, data->progress.t_startsingle));
|
||||||
|
else {
|
||||||
|
k = &data->req;
|
||||||
|
failf(data, "Operation timed out after %ld milliseconds with %"
|
||||||
|
FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received",
|
||||||
|
Curl_tvdiff(now, data->progress.t_startsingle), k->bytecount,
|
||||||
|
k->size);
|
||||||
|
}
|
||||||
easy->result = CURLE_OPERATION_TIMEDOUT;
|
easy->result = CURLE_OPERATION_TIMEDOUT;
|
||||||
multistate(easy, CURLM_STATE_COMPLETED);
|
multistate(easy, CURLM_STATE_COMPLETED);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user