cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Does not returns in network connection error

From: Ranu Gontia <ranu_gontia_at_persistent.co.in>
Date: Thu, 29 Jan 2009 14:29:54 +0530

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Sunday, January 25, 2009 4:47 AM
To: libcurl development
Subject: Re: Does not returns in network connection error

On Sat, 24 Jan 2009, Ranu Gontia wrote:

>> I have made an client for uploading file using curl lib.
>>
>> If in middle of transfer, network goes down, retCode =
>> curl_easy_perform(curlhandle);
>>
>> Does not retuns. I am totally stuck.
>>
>> I don't know what to do.

> Uploading only over FTP I take it?
>
> What libcurl version on what operating system?
>
> Does it always hang?
>
> When it hangs, how much of the file has been transfered?
>
> Does the ftpupload.c example code upload fine for you?

-- 
  / daniel.haxx.se
I got the solution of my problem.
I had to add two more statement in the code.
retCode = curl_easy_setopt( curlhandle, CURLOPT_TIMEOUT, 60); 
retCode = curl_easy_setopt( curlhandle, CURLOPT_FTP_RESPONSE_TIMEOUT, 30);
Thanks for the help.
Received on 2009-01-29