mirror of
https://github.com/curl/curl.git
synced 2026-08-24 13:03:35 +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
|
|
@ -889,7 +889,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data,
|
|||
*didwhat &= ~KEEP_SEND; /* we didn't write anything actually */
|
||||
|
||||
/* set a timeout for the multi interface */
|
||||
Curl_expire(data, data->set.expect_100_timeout);
|
||||
Curl_expire(data, data->set.expect_100_timeout, EXPIRE_100_TIMEOUT);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1338,10 +1338,10 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
|
|||
Curl_pgrsStartNow(data);
|
||||
|
||||
if(data->set.timeout)
|
||||
Curl_expire(data, data->set.timeout);
|
||||
Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT);
|
||||
|
||||
if(data->set.connecttimeout)
|
||||
Curl_expire(data, data->set.connecttimeout);
|
||||
Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT);
|
||||
|
||||
/* In case the handle is re-used and an authentication method was picked
|
||||
in the session we need to make sure we only use the one(s) we now
|
||||
|
|
@ -1942,7 +1942,7 @@ Curl_setup_transfer(
|
|||
|
||||
/* Set a timeout for the multi interface. Add the inaccuracy margin so
|
||||
that we don't fire slightly too early and get denied to run. */
|
||||
Curl_expire(data, data->set.expect_100_timeout);
|
||||
Curl_expire(data, data->set.expect_100_timeout, EXPIRE_100_TIMEOUT);
|
||||
}
|
||||
else {
|
||||
if(data->state.expect100header)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue