Ignore:
Timestamp:
Dec 15, 2008, 9:22:08 PM (13 years ago)
Author:
charles
Message:

(trunk libT) probable fix for the "greedy peer" bug

File:
1 edited

Legend:

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

    r7289 r7402  
    544544{
    545545    /* this is all kind of arbitrary, but what seems to work well is
    546      * being large enough to hold the next 15 seconds' worth of input,
    547      * or two and a half blocks, whichever is bigger.
     546     * being large enough to hold the next 20 seconds' worth of input,
     547     * or a few blocks, whichever is bigger.
    548548     * It's okay to tweak this as needed */
    549549    const double maxBlockSize = 16 * 1024; /* 16 KiB is from BT spec */
    550550    const double currentSpeed = tr_bandwidthGetPieceSpeed( io->bandwidth, TR_UP );
    551551    const double period = 20; /* arbitrary */
    552     return MAX( maxBlockSize*2.5, currentSpeed*1024*period );
     552    return MAX( maxBlockSize*5.5, currentSpeed*1024*period );
    553553}
    554554
Note: See TracChangeset for help on using the changeset viewer.