curl / Mailing Lists / curl-library / Single Mail


Re: Recovering from dropped connections with multi curl

From: doa379 <>
Date: Tue, 14 Mar 2017 23:09:21 +0000

>> The problem I am having is with dropped internet connections when this
>> function is already running. In such situations I would like U = 0 so
>> that the main loop ends and the function returns back to its origin.
>> This isn't happening. Most of the time after the internet connection
>> is dropped and then re-established, the function is stuck in the main
>> while loop with U != 0.
> I suppose that's simply because libcurl didn't actually trigger an error
> for those cases so all that happened was that when the internet
> connection "dropped" your transfers stalled, waiting for the
> connectivity to come back. TCP is after all designed to work exactly
> like that.
> If you want to detect that better, you should consider setting
> CURLOPT_TCP_KEEPALIVE and/or to use some timeouts like

Magic 8) LOL


Received on 2017-03-15