Changeset 10298


Ignore:
Timestamp:
Mar 1, 2010, 3:29:28 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #2964 "Multiple simultaneous DNS resolve operations fail on some platforms causing unnecessary delays in successful announces" -- fixed in trunk for 1.92. Thanks to gongloo for the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/web.c

    r10247 r10298  
    3232    DEFAULT_TIMER_MSEC = 250, /* arbitrary */
    3333
    34     MIN_DNS_CACHE_TIME = 60 * 60 * 24
     34    DNS_CACHE_FAIL_TTL = 120 /* seconds */
    3535};
    3636
     
    218218        item->host = tr_strdup( host );
    219219        item->resolved_host = NULL;
    220         item->expiration = tr_time( ) + MIN_DNS_CACHE_TIME;
     220        item->expiration = tr_time( ) + DNS_CACHE_FAIL_TTL;
    221221        item->success = FALSE;
    222222        tr_ptrArrayInsertSorted( cache, item, dns_cache_compare );
     
    229229{
    230230    char * ret = NULL;
    231 
    232     ttl = MAX( MIN_DNS_CACHE_TIME, ttl );
    233231
    234232    if( task->session->web != NULL )
     
    386384        curl_easy_setopt( e, CURLOPT_WRITEDATA, task );
    387385        curl_easy_setopt( e, CURLOPT_WRITEFUNCTION, writeFunc );
    388         curl_easy_setopt( e, CURLOPT_DNS_CACHE_TIMEOUT, MIN_DNS_CACHE_TIME );
    389386        curl_easy_setopt( e, CURLOPT_FOLLOWLOCATION, 1L );
    390387        curl_easy_setopt( e, CURLOPT_AUTOREFERER, 1L );
Note: See TracChangeset for help on using the changeset viewer.