cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: patches: ares non blocking connect, libcurl ares sync resolve timeout

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 29 Jan 2004 13:41:08 +0100 (CET)

On Wed, 28 Jan 2004, Dirk Manske wrote:

> I noticed that resolving with ares(-1.0-pre1) sometimes does not timeout,
> because setting socket non blocking in open_tcp_socket() in ares_process.c
> is faulty:

[...]

Indeed. I've applied your fix and committed. Thanks!

> To be portable as curl ares should use the same code as in Curl_nonblock().

I agree. I might address that in the future if I go with a 'common' dir for
portability functions to be used by both libcurl and curl. Perhaps c-ares
could use that too.

> If ares and synchronous resolving in libcurl-7.11.0-pre1 is used no resolve
> timeout is set. I've fixed that. The timeout is configurable.

Two questions on this:

1. Doesn't ares have a default timeout if this isn't set like this?

2. Wouldn't it be enough to have a fairly long default timeout, and then
   acknowledge CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT in case they're
   shorter than the default? I mean, is it really necessary to introduce yet
   another timeout?

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-30