Changeset 12164


Ignore:
Timestamp:
Mar 14, 2011, 4:52:47 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) more announce.c work: better handling of incrementing the retry interval on scrape failures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer.c

    r12160 r12164  
    204204    int downloaderCount;
    205205
    206     int consecutiveAnnounceFailures;
     206    int consecutiveFailures;
    207207
    208208    uint32_t id;
     
    852852    int minutes;
    853853    const unsigned int jitter_seconds = tr_cryptoWeakRandInt( 60 );
    854     switch( t->consecutiveAnnounceFailures ) {
     854    switch( t->consecutiveFailures ) {
    855855        case 0:  minutes =   1; break;
    856856        case 1:  minutes =   5; break;
     
    877877{
    878878    int interval;
     879
     880    /* increment the error count */
     881    if( tier->currentTracker != NULL )
     882        ++tier->currentTracker->consecutiveFailures;
    879883
    880884    /* set the error message */
     
    942946        tier->manualAnnounceAllowedAt = now + tier->announceMinIntervalSec;
    943947
    944         if(( tracker = tier->currentTracker ))
    945             ++tracker->consecutiveAnnounceFailures;
    946 
    947948        if( !response->did_connect )
    948949        {
     
    967968
    968969            if(( tracker = tier->currentTracker ))
    969                 tracker->consecutiveAnnounceFailures = 0;
     970                tracker->consecutiveFailures = 0;
    970971
    971972            if(( str = response->warning ))
     
    10941095{
    10951096    int interval;
     1097
     1098    /* increment the error count */
     1099    if( tier->currentTracker != NULL )
     1100        ++tier->currentTracker->consecutiveFailures;
    10961101
    10971102    /* set the error message */
     
    11991204                        tracker->downloadCount = row->downloads;
    12001205                        tracker->downloaderCount = row->downloaders;
     1206                        tracker->consecutiveFailures = 0;
    12011207                    }
    12021208                }
Note: See TracChangeset for help on using the changeset viewer.