]> granicus.if.org Git - transmission/commitdiff
(trunk libT) experimental commit for faster tracker announces
authorCharles Kerr <charles@transmissionbt.com>
Wed, 3 Feb 2010 03:38:13 +0000 (03:38 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Wed, 3 Feb 2010 03:38:13 +0000 (03:38 +0000)
libtransmission/announcer.c
libtransmission/web.c

index 9cd78ce39befe8c9e8ccd0dcd3e47d8d8c267d41..6efabf5a8600bfbe6bc43f05948b485837ffb6e0 100644 (file)
@@ -57,10 +57,10 @@ enum
     KEYLEN = 8,
 
     /* how many scrapes we allow at one time */
-    MAX_CONCURRENT_SCRAPES = 96,
+    MAX_CONCURRENT_SCRAPES = 48,
 
     /* how many announces we allow at one time */
-    MAX_CONCURRENT_ANNOUNCES = 96,
+    MAX_CONCURRENT_ANNOUNCES = 48,
 
     /* if a tracker takes more than this long to respond,
      * we treat it as nonresponsive */
index b9829cc8518663238a4a4c235f2630c85f37129c..2d0f1ef2488a03d8c583ca6a609b08fa7c552664 100644 (file)
@@ -29,7 +29,7 @@ enum
 {
     TR_MEMORY_TRASH = 0xCC,
 
-    DEFAULT_TIMER_MSEC = 1500, /* arbitrary */
+    DEFAULT_TIMER_MSEC = 250, /* arbitrary */
 
     MIN_DNS_CACHE_TIME = 60 * 60 * 24
 };
@@ -378,7 +378,6 @@ addTask( void * vtask )
         evtimer_set( &task->timer_event, task_timeout_cb, task );
         tr_timerAdd( &task->timer_event, timeout, 0 );
 
-        curl_easy_setopt( e, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
         curl_easy_setopt( e, CURLOPT_SOCKOPTFUNCTION, sockoptfunction );
         curl_easy_setopt( e, CURLOPT_SOCKOPTDATA, task );
         curl_easy_setopt( e, CURLOPT_WRITEDATA, task );
@@ -386,8 +385,7 @@ addTask( void * vtask )
         curl_easy_setopt( e, CURLOPT_DNS_CACHE_TIMEOUT, MIN_DNS_CACHE_TIME );
         curl_easy_setopt( e, CURLOPT_FOLLOWLOCATION, 1L );
         curl_easy_setopt( e, CURLOPT_AUTOREFERER, 1L );
-        curl_easy_setopt( e, CURLOPT_FORBID_REUSE, 1L );
-        curl_easy_setopt( e, CURLOPT_MAXREDIRS, -1L );
+        curl_easy_setopt( e, CURLOPT_MAXREDIRS, 4L );
         curl_easy_setopt( e, CURLOPT_NOSIGNAL, 1L );
         curl_easy_setopt( e, CURLOPT_PRIVATE, task );
         curl_easy_setopt( e, CURLOPT_SSL_VERIFYHOST, 0L );