mirror of
https://github.com/curl/curl.git
synced 2026-08-04 20:16:15 +03:00
failf() now only overwrites the error buffer the first time it gets called
for each *_perform(). It makes things a lot easier, as the first one that detects the error get to write the final error reason...
This commit is contained in:
parent
5b948512f9
commit
4163b86cd2
3 changed files with 8 additions and 2 deletions
|
|
@ -863,7 +863,7 @@ Transfer(struct connectdata *c_conn)
|
|||
}
|
||||
|
||||
if (data->set.timeout &&
|
||||
((Curl_tvdiff(now, start)/1000) > data->set.timeout)) {
|
||||
((Curl_tvdiff(now, start)/1000) >= data->set.timeout)) {
|
||||
failf (data, "Operation timed out with %d out of %d bytes received",
|
||||
bytecount, conn->size);
|
||||
return CURLE_OPERATION_TIMEOUTED;
|
||||
|
|
@ -914,6 +914,7 @@ CURLcode Curl_perform(struct SessionHandle *data)
|
|||
|
||||
data->set.followlocation=0; /* reset the location-follow counter */
|
||||
data->state.this_is_a_follow = FALSE; /* reset this */
|
||||
data->state.errorbuf = FALSE; /* no error has occurred */
|
||||
|
||||
Curl_initinfo(data); /* reset session-specific information "variables" */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue