From 50143196220fe2c8c81c38e77e354818ce6859b1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 3 Feb 2010 03:38:13 +0000 Subject: [PATCH] (trunk libT) experimental commit for faster tracker announces --- libtransmission/announcer.c | 4 ++-- libtransmission/web.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libtransmission/announcer.c b/libtransmission/announcer.c index 9cd78ce39..6efabf5a8 100644 --- a/libtransmission/announcer.c +++ b/libtransmission/announcer.c @@ -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 */ diff --git a/libtransmission/web.c b/libtransmission/web.c index b9829cc85..2d0f1ef24 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -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 );