cURL / Mailing Lists / curl-library / Single Mail


Re: Bug: curl 7.18.2/7.19.2 looses timeouts

From: Daniel Stenberg <>
Date: Fri, 21 Nov 2008 10:47:41 +0100 (CET)

On Thu, 20 Nov 2008, wrote:

> I had the same idea first, but figured out I might be wrong, as the timer_cb
> gets called, and following the code path I figured when calling

> curl_multi_socket_action( ... TIMEOUT ... )
> Curl_readwrite() gets called.

Why would Curl_readwrite() get called on a timeout? I can only see that happen
when the easy handle is in the PERFORM state.

> Curl_readwrite() would call Curl_speecheck().

Yes, so if you call libcurl when the handle is in PERFORM it'll work in the
sense that it'll run Curl_speecheck(). But of course the handle may not be in
that state and Curl_speecheck() doesn't set any timeout or anything so you'll
probably end up with no timeout set on the handle even if the speed should get
checked soon again to see if it would match the criterias then.

> The code for "evhiperfifo.c" is attached, basically a port of hiperfifo.c to
> use libev instead of libevent, making use of the curl_multi_socket_action
> api instead of curl_multi_socket, fixing check_run_count to list all
> finished downloads and using the LOW_SPEED options.

Nice! I'll give it a check and I'll commit it in the examples section as I'm
sure others will enjoy it as well.

Received on 2008-11-21