cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl + libevent2: Stalling if no data is received/written [new timeout patch]

From: Dirk Manske <dm_at_nonitor.de>
Date: Wed, 1 Sep 2010 11:50:09 +0200

On Tuesday 31 August 2010 23:56:46 Daniel Stenberg wrote:
> On Tue, 31 Aug 2010, Dirk Manske wrote:
> > But I got a little different behaivor, after the 4s count down is gone, curl
> > returns -1 instead of ~4000
>
> Exactly, and that's what I fixed as that was an obvious bug.
I used the wrong tense. I still _get_ -1.

I've verified again. And I've forgotten to switch back from threaded resolver
to c-ares. And with c-ares it's really fixed, sorry that I didn't get that.
Only if curl is configured to use threaded resolver I see the misbehavior
of total timeout in multi-single.

> > Also I think, it should start with ~7000 because the connection was already
> > done.
>
> No, it can't do that. As we already have discussed, libcurl currently has no
> way to cancel one of its internal timeouts so if we use a connect timeout at 3
> seconds and a global timeout at 10, there are two timeouts set so even if the
> connect succeeds the first timeout will expire after three seconds.
Before the connection is etablished there could be only two timeouts
(resolve,connect) both are gone obsolete after connection. So they could
be easily removed by expire 0 and set then the total timeout.
The timeouts of the speed checks are set later. Or have I missed s.t.?
 
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-01