diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-08-25 11:34:14 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-08-31 23:50:01 +0200 |
commit | cacdc27f52ba7b0bf08aa57886bfbd18bc82ebfb (patch) | |
tree | 6434aab273d0d6be76eb991bc96d6a276ca78571 /lib/asyn-thread.c | |
parent | 09b5a99816a24a12f769f61db5f7eafd4bc32795 (diff) | |
download | curl-cacdc27f52ba7b0bf08aa57886bfbd18bc82ebfb.tar.gz |
low-speed-limit: avoid timeout flood
Introducing Curl_expire_latest(). To be used when we the code flow only
wants to get called at a later time that is "no later than X" so that
something can be checked (and another timeout be added).
The low-speed logic for example could easily be made to set very many
expire timeouts if it would be called faster or sooner than what it had
set its own timer and this goes for a few other timers too that aren't
explictiy checked for timer expiration in the code.
If there's no condition the code that says if(time-passed >= TIME), then
Curl_expire_latest() is preferred to Curl_expire().
If there exists such a condition, it is on the other hand important that
Curl_expire() is used and not the other.
Bug: http://curl.haxx.se/mail/lib-2014-06/0235.html
Reported-by: Florian Weimer
Diffstat (limited to 'lib/asyn-thread.c')
-rw-r--r-- | lib/asyn-thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 6cdc9adff..e4ad32bb7 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -541,7 +541,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, td->poll_interval = 250; td->interval_end = elapsed + td->poll_interval; - Curl_expire(conn->data, td->poll_interval); + Curl_expire_latest(conn->data, td->poll_interval); } return CURLE_OK; |