cURL / Mailing Lists / curl-library / Single Mail

curl-library

Detect failed donwloads

From: Ruslan Gaifulin <omskannihilator_at_gmail.com>
Date: Sun, 16 Feb 2014 11:27:37 +0700

I download multiple files simultaneously with curl_multi_perform
How can I detect if connection is lost during the downloading?
When I simulate the lost connection (disconnecting wi-fi)
select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
returns 0, but it also returns 0 right before the beginning of downloading.
If I connect back, then the downloading resumes but eventually a file turns
out to be corrupted.

-- 
Cheers,
Ruslan Gaifulin
<O.Yurchenko_at_omsk.otpbank.ru>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-16