mirror of
https://github.com/curl/curl.git
synced 2026-07-25 10:47:45 +03:00
multi: set the EXPIRE_*TIMEOUT timers at TIMER_STARTSINGLE time
To make sure Curl_timeleft() also thinks the timeout has been reached when one of the EXPIRE_*TIMEOUTs expires. Bug: https://curl.haxx.se/mail/lib-2019-01/0073.html Reported-by: Zhao Yisha Closes #3501
This commit is contained in:
parent
427fa512be
commit
6f61933adf
2 changed files with 6 additions and 6 deletions
|
|
@ -1454,6 +1454,12 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||
case CURLM_STATE_CONNECT:
|
||||
/* Connect. We want to get a connection identifier filled in. */
|
||||
Curl_pgrsTime(data, TIMER_STARTSINGLE);
|
||||
if(data->set.timeout)
|
||||
Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT);
|
||||
|
||||
if(data->set.connecttimeout)
|
||||
Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT);
|
||||
|
||||
result = Curl_connect(data, &async, &protocol_connect);
|
||||
if(CURLE_NO_CONNECTION_AVAILABLE == result) {
|
||||
/* There was no connection available. We will go to the pending
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue