curl-library
Wrong behavior when activate the LOW_SPEED_LIMIT and LOW_SPEED_TIME
Date: Thu, 13 Sep 2012 23:33:57 +0800
Hi all
I wrote a module using libcurl to support downloading from specified URL.
and for detecting the network broken, I try to use LOW_SPEED_LIMIT and
LOW_SPEED_TIME to detect the <1 byte throughput during LOW_SPEED_TIME(15
mins).
at most time, it works.
but when I limit the receive speed to 1K, libcurl often, actually 100%,
triggers the wrong operation time-out.
e.g. if I set the LOW_SPEED_TIME to n mins, the time-out will be triggered
in n mins, in the same time, the network is OK. it seems the
LOW_SPEED_TIME algorithm has some problems.
and I tried to debug in the libcurl code, found that the array
speeder[CURL_TIME] have 6 same values in the case that LOW_SPEED_LIMIT =
1K. thus, in curl_pgrsupdate(), current_speed was set to 0. after 2 times
speed check, the time-out was thrown.
the libcurl I am using is 7.27.0
-- Best Regards He Jie ºÎ½Ü
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-13