Changeset 10034


Ignore:
Timestamp:
Jan 28, 2010, 7:33:48 PM (12 years ago)
Author:
charles
Message:

(trunk libT) if a tracker doesn't respond during an announce, instead of automatically reannouncing in 120 seconds, add some fuzz to the interval. Rationale: if a bunch of torrents announce at once, overloading the router or server, they'll still be overloading it if we do the exact same thing the second time around...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r10011 r10034  
    12651265        if( responseCode == 0 )
    12661266        {
    1267             dbgmsg( tier, "No response from tracker... retrying in two minutes." );
     1267            const int interval = 120 + tr_cryptoWeakRandInt( 120 );
     1268            dbgmsg( tier, "No response from tracker... retrying in %d seconds.", interval );
    12681269            tier->manualAnnounceAllowedAt = ~(time_t)0;
    1269             tierSetNextAnnounce( tier, tier->announceEvent, now + 120 );
     1270            tierSetNextAnnounce( tier, tier->announceEvent, now + interval );
    12701271        }
    12711272        else if( 200 <= responseCode && responseCode <= 299 )
Note: See TracChangeset for help on using the changeset viewer.