Commit a6ac4048 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Decrease libcurl timeout from indefinite to 30 minutes

parent 6ce29720
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -583,6 +583,13 @@ static char *feh_http_load_image(char *url)
#ifdef DEBUG
			curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
#endif
			/*
			 * Do not allow requests to take longer than 30 minutes.
			 * This should be sufficiently high to accomodate use cases with
			 * unusually high latencies, while at the sime time avoiding
			 * feh hanging indefinitely in unattended slideshows.
			 */
			curl_easy_setopt(curl, CURLOPT_TIMEOUT, 1800);
			curl_easy_setopt(curl, CURLOPT_URL, url);
			curl_easy_setopt(curl, CURLOPT_WRITEDATA, sfp);
			ebuff = emalloc(CURL_ERROR_SIZE);