From 7191386fe7bec6c19f54767eb0b4b6acbf6a222d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 13 May 2011 20:54:50 +0200 Subject: time out after 30 sec of stalled upload Signed-off-by: Florian Pritz --- fb-upload.c.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fb-upload.c.in b/fb-upload.c.in index a6410ee..b0a44ee 100644 --- a/fb-upload.c.in +++ b/fb-upload.c.in @@ -213,6 +213,8 @@ int main(int argc, char *argv[]) curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback); curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent); curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, (long)1); + curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, (long)30); gettimeofday(&cb_data.starttime, NULL); res = curl_easy_perform(curl); -- cgit v1.2.3-24-g4f1b