Changeset 5695


Ignore:
Timestamp:
Apr 25, 2008, 4:06:03 PM (14 years ago)
Author:
charles
Message:

#895: don't scrape running torrents on startup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tracker.c

    r5692 r5695  
    411411    {
    412412        const int interval = t->announceIntervalSec + t->randOffset;
     413        const time_t now = time ( NULL );
    413414        dbgmsg( t->name, "request succeeded. reannouncing in %d seconds", interval );
    414         t->reannounceAt = time( NULL ) + interval;
    415         t->manualAnnounceAllowedAt = time( NULL ) + t->announceMinIntervalSec;
     415        t->scrapeAt = now + t->scrapeIntervalSec + t->randOffset;
     416        t->reannounceAt = now + interval;
     417        t->manualAnnounceAllowedAt = now + t->announceMinIntervalSec;
    416418    }
    417419    else if( 300<=responseCode && responseCode<=399 )
     
    729731            t->lastAnnounceTime = time( NULL );
    730732            t->reannounceAt = 0;
     733            t->scrapeAt = 0;
    731734            t->manualAnnounceAllowedAt = ~(time_t)0;
    732735        }
Note: See TracChangeset for help on using the changeset viewer.