cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: LibCurl Hang when download job disturbed by network interface down

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 13 Jul 2010 21:41:05 -0700

On Wed, Jul 14, 2010 at 11:43:58AM +0800, ±¦Öì wrote:
> I am using curl-7.18.2-6.fc10(libcurl.so.4.1.0)  in linux
> 2.6.21.7-hrt1-WR2.0ap_standard #1 PREEMPT.
>  
> I invoked a get file transfer job, before it completes the download job, there
> is a network interface down event, but this only last several seconds.
> After the network interface being up again, the download job can not
> continue, even no exception happens when the network interface is down.
>  
> The download job just hangs there and block my other process.
>  
> Is it a well-konw problem? Is it already fixed? Have you recognized it? 
>  
> Do you know how to make a workaround for that or how fix?

If the network interface comes back up with a new address, then the existing
connection will no longer be able to continue and it will eventually time
out (which could take 20 minutes). If the interface comes back with the same
address as before, the transfer ought to resume within a few seconds or at
most a few minutes. You can use the CURLOPT_LOW_SPEED_LIMIT and
CURLOPT_LOW_SPEED_TIME options to force an abort more quickly than TCP would
normally do it, and/or just retry the transfer (an equivalent to the curl
tool's --retry option) to redo the transfer once it fails.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-14