curl-library
[PATCH] Re: wrong timeout in Curl_wait_for_resolv
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 31 Mar 2004 14:41:32 +0200 (CEST)
Received on 2004-03-31
Date: Wed, 31 Mar 2004 14:41:32 +0200 (CEST)
On Wed, 31 Mar 2004, Dirk Manske wrote:
> In Curl_wait_for_resolv the timeout is set by following code:
>
> store.tv_sec = (int)(timeout - elapsed);
> tvp = ares_timeout(data->state.areschannel,
> &store, &tv);
> count = select(nfds, &read_fds, &write_fds, NULL, tvp);
>
> After executing ares_timeout tvp->tv_sec has a value of 5, which is the
> DEFAULT_TIMEOUT in ares. ares_timeout choses the smallest timeout value.
Doh! You are painfully correct here.
Fix is attached! Gonna commit this too.
I doubt this is the same problem Roy Shan is seeing though.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.html
- TEXT/PLAIN attachment: ares-timeout.patch