mirror of
https://github.com/curl/curl.git
synced 2026-08-25 21:03:34 +03:00
multi: assign IDs to all timers and make each timer singleton
A) reduces the timeout lists drastically
B) prevents a lot of superfluous loops for timers that expires "in vain"
when it has actually already been extended to fire later on
This commit is contained in:
parent
8dfa378e52
commit
e9fd794a61
10 changed files with 98 additions and 39 deletions
|
|
@ -580,10 +580,8 @@ static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected)
|
|||
else {
|
||||
/* Add timeout to multi handle and break out of the loop */
|
||||
if(!result && *connected == FALSE) {
|
||||
if(data->set.accepttimeout > 0)
|
||||
Curl_expire(data, data->set.accepttimeout);
|
||||
else
|
||||
Curl_expire(data, DEFAULT_ACCEPT_TIMEOUT);
|
||||
Curl_expire(data, data->set.accepttimeout > 0 ?
|
||||
data->set.accepttimeout: DEFAULT_ACCEPT_TIMEOUT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue