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/multiif.h | |
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/multiif.h')
-rw-r--r-- | lib/multiif.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/multiif.h b/lib/multiif.h index 1cbd31009..c77b3ca3b 100644 --- a/lib/multiif.h +++ b/lib/multiif.h @@ -26,6 +26,7 @@ * Prototypes for library-wide functions provided by multi.c */ void Curl_expire(struct SessionHandle *data, long milli); +void Curl_expire_latest(struct SessionHandle *data, long milli); bool Curl_multi_pipeline_enabled(const struct Curl_multi* multi); void Curl_multi_handlePipeBreak(struct SessionHandle *data); |