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

(1.4x libT) probable fix for the "greedy peer" bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4x/libtransmission/peer-io.c

    r7176 r7403  
    534534{
    535535    /* this is all kind of arbitrary, but what seems to work well is
    536      * being large enough to hold the next 15 seconds' worth of input,
    537      * or two and a half blocks, whichever is bigger.
     536     * being large enough to hold the next 20 seconds' worth of input,
     537     * or a few blocks, whichever is bigger.
    538538     * It's okay to tweak this as needed */
    539539    const double maxBlockSize = 16 * 1024; /* 16 KiB is from BT spec */
    540540    const double currentSpeed = tr_bandwidthGetPieceSpeed( io->bandwidth, TR_UP );
    541541    const double period = 20; /* arbitrary */
    542     return MAX( maxBlockSize*2.5, currentSpeed*1024*period );
     542    return MAX( maxBlockSize*5.5, currentSpeed*1024*period );
    543543}
    544544
Note: See TracChangeset for help on using the changeset viewer.