curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Recovering from dropped connections with multi curl

From: doa379 <doa379_at_gmail.com>
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
> CURLOPT_LOW_SPEED_LIMIT / CURLOPT_LOW_SPEED_TIME.
>

Magic 8) LOL

!

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-15