multi: make Curl_expire() work with 0 ms timeouts

Previously, passing a timeout of zero to Curl_expire() was a magic code
for clearing all timeouts for the handle. That is now instead made with
the new Curl_expire_clear() function and thus a 0 timeout is fine to set
and will trigger a timeout ASAP.

This will help removing short delays, in particular notable when doing
HTTP/2.
This commit is contained in:
Daniel Stenberg 2016-08-02 10:57:30 +02:00
parent 6eb60c2dc5
commit bde2f09d5e
7 changed files with 94 additions and 84 deletions

View file

@ -405,7 +405,7 @@ CURLcode Curl_close(struct Curl_easy *data)
if(!data)
return CURLE_OK;
Curl_expire(data, 0); /* shut off timers */
Curl_expire_clear(data); /* shut off timers */
m = data->multi;