Changeset 7447


Ignore:
Timestamp:
Dec 21, 2008, 6:31:28 PM (12 years ago)
Author:
charles
Message:

(trunk libT) remove tr_peermsgs.minActiveRequests based on wereHamster's feedback

File:
1 edited

Legend:

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

    r7445 r7447  
    281281    uint16_t        pexCount;
    282282    uint16_t        pexCount6;
    283     uint16_t        minActiveRequests;
    284283    uint16_t        maxActiveRequests;
    285284
     
    904903{
    905904    const int           max = msgs->maxActiveRequests;
    906     const int           min = msgs->minActiveRequests;
    907905    int                 sent = 0;
    908906    int                 count = msgs->clientAskedFor.count;
    909907    struct peer_request req;
    910908
    911     if( count > min )
    912         return;
    913909    if( msgs->peer->clientIsChoked )
    914910        return;
     
    17691765    const double rateToClient = tr_peerGetPieceSpeed( msgs->peer, TR_PEER_TO_CLIENT );
    17701766    const int seconds = 10;
     1767    const int floor = 8;
    17711768    const int estimatedBlocksInPeriod = ( rateToClient * seconds * 1024 ) / msgs->torrent->blockSize;
    17721769
    1773     msgs->minActiveRequests = 8;
    1774     msgs->maxActiveRequests = msgs->minActiveRequests + estimatedBlocksInPeriod;
     1770    msgs->maxActiveRequests = floor + estimatedBlocksInPeriod;
    17751771
    17761772    if( msgs->reqq > 0 )
Note: See TracChangeset for help on using the changeset viewer.