cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: error (6) : name lookup timed out

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 4 Dec 2008 11:25:25 -0800

On Thu, Dec 04, 2008 at 01:18:04PM +0100, Daniel Stenberg wrote:
> As you're (most likely) not using c-ares, libcurl is using the "plain"
> name resolver calls gethostbyname() or getaddrinfo() and if they fail I
> don't see how it can be libcurl's fault... :-O

If the DNS servers change after the network reconnection, then that would
explain why a gethostbyname() would fail. glibc (and probably others) require
that res_init() be called to reread /etc/resolv.conf and start using the
new nameservers in that case. An app should probably do that and retry a
download after it gets a CURLE_COULDNT_RESOLVE_HOST error.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-12-04