cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 24 Aug 2010 22:25:10 +0200 (CEST)

On Tue, 24 Aug 2010, Dirk Manske wrote:

>> Right, but isn't this the results of the same problem Constantine
>> Sapuntzakis and I've been talking about: the fact that Curl_expire(..., 0)
>> currently erases all currently set timeouts?
>
> No. In my environment expire 0 does not remove all timeouts.
> Even that coundn't be the problem, that a connected handle will not be
> terminated by operation timeout.

Argh. I'm sorry I mislead you, I expressed myself badly.

expire 0 removes all timeouts associated to that particular handle. If there
are more handles, the other handles may of course have timeouts and they will
then be affecting the single timeout timer libcurl exposes to the app. All
involved easy handles' timeout values exist in a sorted (splay) tree and the
closest one in time is what is signalled to the app.

But imagine only one handle added that sets CURLOPT_TIMEOUT to something, then
we set a timeout to limit the resolve or the connect phase, and after each of
those phases we kill the previous timeout with an expire 0 (I'm not sure we
do), then the initial CURLOPT_TIMEOUT is gone.

> Following test is done with patched curl

I think a test for this is best done with only a single handle.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-24