Changeset 11533


Ignore:
Timestamp:
Dec 14, 2010, 6:36:31 PM (11 years ago)
Author:
charles
Message:

(trunk libT) #3656 "endgame could be faster" -- revert the test code from r11528

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r11532 r11533  
    10941094        struct weighted_piece * p = pieces + i;
    10951095        const int missing = tr_cpMissingBlocksInPiece( &tor->completion, p->index );
    1096 
    1097         if( !endgame && ( p->requestCount > missing ) )
     1096        const int maxDuplicatesPerBlock = endgame ? 3 : 1;
     1097
     1098        if( p->requestCount > ( missing * maxDuplicatesPerBlock ) )
    10981099            continue;
    10991100
     
    11151116
    11161117                /* don't send the same request to any peer too many times */
    1117                 if( !endgame && countBlockRequests( t, b ) )
     1118                if( countBlockRequests( t, b ) >= maxDuplicatesPerBlock )
    11181119                    continue;
    11191120
Note: See TracChangeset for help on using the changeset viewer.