Changeset 7560


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

(trunk libT) take the timeout condition out of tr_bandwidthAllocate(). This may have the short-term effect of adding 1.41's `freeze' behavior into trunk for a bit. Yay!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bandwidth.c

    r7524 r7560  
    298298    tr_ptrArray tmp = TR_PTR_ARRAY_INIT;
    299299    struct tr_peerIo ** peers;
    300     const uint64_t now = tr_date( );
    301     const uint64_t cutoff = now + 100; /* 1/10th of a second */
    302300
    303301
     
    315313    /* First phase of IO.  Tries to distribute bandwidth fairly to keep faster
    316314     * peers from starving the others.  Loop through the peers, giving each a
    317      * small chunk of bandwidth.  Keep looping until we reach the cutoff or
    318      * run out of bandwidth and/or peers that can use it */
     315     * small chunk of bandwidth.  Keep looping until we run out of bandwidth
     316     * and/or peers that can use it */
    319317    n = peerCount;
    320318    i = n ? tr_cryptoWeakRandInt( n ) : 0; /* pick a random starting point */
    321     for( ; n>0 && tr_date()<=cutoff; )
    322     {
    323         const int increment = n==1 ? 4096 : 1024;
     319    for( ; n>1 ; )
     320    {
     321        const int increment = 1024;
    324322        const int byteCount = tr_peerIoFlush( peers[i], dir, increment);
    325323
Note: See TracChangeset for help on using the changeset viewer.