From 3524ae637efd5325c334579e01a7b0f1b3c5e1fa Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 8 Sep 2009 18:39:20 +0000 Subject: [PATCH] (trunk libT) sync the announce/scrape timeout intervals in trunk with those in 1.7x --- libtransmission/web.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libtransmission/web.c b/libtransmission/web.c index 6c797f95b..b86c0f2fe 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -212,14 +212,17 @@ addTask( void * vtask ) 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" ) ) + if( strstr( task->url, "scrape" ) ) + curl_easy_setopt( easy, CURLOPT_TIMEOUT, 15L ); + else if( strstr( task->url, "announce" ) ) curl_easy_setopt( easy, CURLOPT_TIMEOUT, 30L ); + else + curl_easy_setopt( easy, CURLOPT_TIMEOUT, 240L ); curl_easy_setopt( easy, CURLOPT_FOLLOWLOCATION, 1L ); + curl_easy_setopt( easy, CURLOPT_AUTOREFERER, 1L ); curl_easy_setopt( easy, CURLOPT_FORBID_REUSE, 1L ); - curl_easy_setopt( easy, CURLOPT_MAXREDIRS, 16L ); + curl_easy_setopt( easy, CURLOPT_MAXREDIRS, -1L ); curl_easy_setopt( easy, CURLOPT_NOSIGNAL, 1L ); curl_easy_setopt( easy, CURLOPT_PRIVATE, task ); curl_easy_setopt( easy, CURLOPT_SSL_VERIFYHOST, 0L );