curl-library
Re: timeout when you unplug the ethernet cable?
Date: Mon, 20 Dec 2004 10:43:23 -0800
On Mon, Dec 20, 2004 at 07:03:23PM +0100, Christoph Rupp wrote:
> dear list,
>
> i have a small problem with the following situation; a program uses
> libcurl to download an internet stream, but when you unplug the ethernet
> cable, disconnect the router, or run "ifconfig eth0 down", the program
> will hang for a very, very long time before it gets a timeout. how can i
> set this timeout to a few seconds? is this a libcurl-option or a
> system-wide setting? (i run linux 2.6)
It's probably a TCP failure that is ultimately closing your connection.
If it's Linux you're using, you could try using sysctl to set different
values for net.ipv4.tcp_retries2 and net.ipv4.tcp_retries1 to make TCP
abort faster, but beware that this effects all networking applications
on your system.
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2004-12-20