Changeset 6637


Ignore:
Timestamp:
Aug 22, 2008, 8:45:36 PM (13 years ago)
Author:
charles
Message:

#1181: FreeBSD torrent almost never successfully scrapes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3x/libtransmission/tracker.c

    r6489 r6637  
    399399        const time_t now = time ( NULL );
    400400        dbgmsg( t->name, "request succeeded. reannouncing in %d seconds", interval );
    401         t->scrapeAt = now + t->scrapeIntervalSec + t->randOffset;
     401        if( t->scrapeAt <= now )
     402            t->scrapeAt = now + t->scrapeIntervalSec + t->randOffset;
    402403        t->reannounceAt = now + interval;
    403404        t->manualAnnounceAllowedAt = now + t->announceMinIntervalSec;
     
    731732}
    732733
    733 static void ensureGlobalsExist( tr_session * );
    734 
    735734static void
    736735enqueueScrape( tr_session * session, tr_tracker * tracker )
    737736{
    738737    struct tr_tracker_request * req;
    739     ensureGlobalsExist( session );
    740738    req = createScrape( session, tracker );
    741739    tr_runInEventThread( session, invokeRequest, req );
     
    746744{
    747745    struct tr_tracker_request * req;
    748     ensureGlobalsExist( session );
    749746    req = createRequest( session, tracker, reqtype );
    750747    tr_runInEventThread( session, invokeRequest, req );
     
    856853    const tr_info * info = &torrent->info;
    857854    tr_tracker * t;
     855
     856    ensureGlobalsExist( torrent->handle );
    858857
    859858    t = tr_new0( tr_tracker, 1 );
Note: See TracChangeset for help on using the changeset viewer.