diff options
author | Dirk Manske <dm@nonitor.de> | 2010-09-20 13:58:51 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-09-27 21:12:49 +0200 |
commit | 397e61128f8e384bdb24b71a29a7f7fe93b07262 (patch) | |
tree | 5f31cbba3777e2b613fa46425da6d52be4d997b6 /lib | |
parent | 578e833d3b03545e9e5552cf35f97d7e8ec20be2 (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/multi.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index 13915c120..e857392e0 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -985,6 +985,19 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(timeout_ms < 0) { /* 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; multistate(easy, CURLM_STATE_COMPLETED); break; |