mirror of
https://github.com/curl/curl.git
synced 2026-05-14 10:56:19 +03:00
multi: close connection on timeout
After a request times out, the connection wasn't properly closed and prevented to get re-used, so subsequent transfers could still mistakenly get to use the previously aborted connection.
This commit is contained in:
parent
d85cae9225
commit
c4369f34b9
1 changed files with 5 additions and 0 deletions
|
|
@ -1003,6 +1003,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||
Curl_tvdiff(now, data->progress.t_startsingle), k->bytecount,
|
||||
k->size);
|
||||
}
|
||||
|
||||
/* Force the connection closed because the server could continue to
|
||||
send us stuff at any time. (The disconnect_conn logic used below
|
||||
doesn't work at this point). */
|
||||
easy->easy_conn->bits.close = TRUE;
|
||||
easy->result = CURLE_OPERATION_TIMEDOUT;
|
||||
multistate(easy, CURLM_STATE_COMPLETED);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue