]> granicus.if.org Git - curl/commit
low-speed-limit: avoid timeout flood
authorDaniel Stenberg <daniel@haxx.se>
Mon, 25 Aug 2014 09:34:14 +0000 (11:34 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 31 Aug 2014 21:50:01 +0000 (23:50 +0200)
commitcacdc27f52ba7b0bf08aa57886bfbd18bc82ebfb
tree6434aab273d0d6be76eb991bc96d6a276ca78571
parent09b5a99816a24a12f769f61db5f7eafd4bc32795
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
lib/asyn-ares.c
lib/asyn-thread.c
lib/connect.c
lib/multi.c
lib/multiif.h
lib/speedcheck.c