cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Bug: curl 7.18.2/7.19.2 looses timeouts

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 15 Nov 2008 20:05:39 +0100 (CET)

On Sat, 15 Nov 2008, koettermarkus_at_gmx.de wrote:

First, the subject is very generic but I don't think this is such a generic
problem.

> The hiperfifo.c code from doc/examples is outdated as it does not use
> curl_multi_socket_action, and uses curl_multi_socket_all for no obvious
> reason

Correct. It was written back in the time when the (better) alternatives didn't
yet exist, and nobody has updated it since. I welcome patches!

> curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 3L);
> curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 10L);

> One can see, that this session never times out, the timer_cb callback gets
> called *once*, but the session is not removed for being too slow.

I'm not sure I've ever tested the CURLOPT_LOW_SPEED_* magic using the
multi_socket API and it clearly sounds like it is buggy by your description.

> But: sometimes it works! In this case the timer_cb gets called and installs
> another timer_cb, which times out the connection as expected (too_slow).

Uh, so it seems it depends in timing or some other factors...

> As I've been unable to figure out whats going wrong I'm not sending in a
> patch to fix the problem.

I do have a serious backlog of bugs to deal with but I hope to be able to give
this a closer investigation soon.

-- 
  / daniel.haxx.se
Received on 2008-11-15