1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

(trunk libT) tell libcurl to set a time limit of 120 seconds for announces; 30 seconds for scrapes

This commit is contained in:
Charles Kerr 2009-08-22 23:22:50 +00:00
parent a61a5779f8
commit 786887b147

View file

@ -197,6 +197,13 @@ addTask( void * vtask )
curl_easy_setopt( easy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); curl_easy_setopt( easy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
curl_easy_setopt( easy, CURLOPT_DNS_CACHE_TIMEOUT, 360L ); curl_easy_setopt( easy, CURLOPT_DNS_CACHE_TIMEOUT, 360L );
curl_easy_setopt( easy, CURLOPT_CONNECTTIMEOUT, 60L ); curl_easy_setopt( easy, CURLOPT_CONNECTTIMEOUT, 60L );
/* set a time limit for announces & scrapes */
if( strstr( task->url, "announce" ) )
curl_easy_setopt( easy, CURLOPT_TIMEOUT, 120L );
else if( strstr( task->url, "scrape" ) )
curl_easy_setopt( easy, CURLOPT_TIMEOUT, 30L );
curl_easy_setopt( easy, CURLOPT_FOLLOWLOCATION, 1L ); curl_easy_setopt( easy, CURLOPT_FOLLOWLOCATION, 1L );
curl_easy_setopt( easy, CURLOPT_FORBID_REUSE, 1L ); curl_easy_setopt( easy, CURLOPT_FORBID_REUSE, 1L );
curl_easy_setopt( easy, CURLOPT_MAXREDIRS, 16L ); curl_easy_setopt( easy, CURLOPT_MAXREDIRS, 16L );