cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with async connect in multi interface

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 23 Sep 2002 13:54:21 +0200 (MET DST)

On 16 Sep 2002, yarram sunil wrote:

(Sorry it's taken a while to respond)

> I am using curl-7.9.9-pre1 on windows.
>
> Data is fetched through a proxy using multi interface and same
> handle is used more than once.
>
> An invalid socket is being reused which would be clear if we
> consider the following case : All the following steps are
> chronological in order
> 1. A connect is made to a proxy and a wait is called
> asynchronously. It timed out because proxy was down. This
> connection data is stored with handle and not removed from it.
> 2. Later proxy has come up
> 3.Again a second request is made through the same handle, now
> handle's connection data structure shows an existing connection
> (which actually was timed out).

This is clearly a mistake, it should close the previous connection when the
timeout occurs. I would be happy if you could try the attached patch here and
see if it helps out!

> Also the function "Curl_is_connected" defined in file "connect.c" returns
> "CURLE_OPERATION_TIMEOUTED" when the connect times out. I think
> "CURLE_COULDNT_CONNECT" return code would be appropriate here.

I don't agree. CURLE_OPERATION_TIMEOUTED is returned when a timeout set by
you has elapsed. If it fails for normal/default network reasons,
CURLE_COULDNT_CONNECT is returned.

--
 Daniel Stenberg -- curl related mails on curl related mailing lists please

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Received on 2002-09-23