cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: error (6) : name lookup timed out

From: sundararaj reel <sundararaj.reel_at_googlemail.com>
Date: Thu, 4 Dec 2008 12:20:25 +0100

On Thu, Dec 4, 2008 at 12:07 PM, Bharat Varma <nbharatvarma_at_gmail.com>wrote:

>
>
> 2008/12/4 sundararaj reel <sundararaj.reel_at_googlemail.com>
>
>
>> Hi all,
>>
>> I have a simple download-job to do. It is called multiple times in a
>> program.
>>
>> The problem arises when the internet connection goes down and is up
>> again. curl is not able to reach the server even after internet connection
>> is reestablished.
>>
>> I have tried CURLOPT_FRESH_CONNECT and CURLOPT_FORBID_REUSE. The result
>> does not change. But if the program is restarted then the server is once
>> again reachable.
>>
>> Here is a small example to show the behaviour.
>> Code : http://codepad.org/eC6CNr17
>> Output: http://codepad.org/F5lJPXHV
>>
>> How can libcurl reach the server when connection has been restablished,
>> without restarting the program ?
>>
>
> you could perhaps try cleaning up the handle and initing it again
>
>

Isn't that being done with every call to curl_download() in the line 15 CURL
*curl = curl_easy_init (); ?

-- 
Sundararaj
Received on 2008-12-04