Changeset 11527


Ignore:
Timestamp:
Dec 12, 2010, 11:27:30 PM (11 years ago)
Author:
charles
Message:

(trunk libT) #3658 "don't initiate new peer connections if our bandwidth is maxed out" -- added to trunk for nightly build users to kick around a bit. this is an experimental patch and I'm not sure how I feel about it.

File:
1 edited

Legend:

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

    r11506 r11527  
    34803480    const int maxCandidates = tr_sessionGetPeerLimit( session ) * 0.95;
    34813481
    3482     /* don't start any new handshakes if we're full up */
     3482    /* don't start any new handshakes if we have enough peers */
    34833483    n = 0;
    34843484    tor= NULL;
     
    35023502    {
    35033503        int i, nAtoms;
     3504        tr_bool full_up;
     3505        tr_bool full_dn;
    35043506        struct peer_atom ** atoms;
    35053507
     
    35123514
    35133515        /* if we've already got enough speed in this torrent... */
    3514         if( tr_torrentIsSeed( tor ) && isBandwidthMaxedOut( tor->bandwidth, now_msec, TR_UP ) )
     3516        full_up = isBandwidthMaxedOut( tor->bandwidth, now_msec, TR_UP );
     3517        full_dn = isBandwidthMaxedOut( tor->bandwidth, now_msec, TR_DOWN );
     3518        if( full_up && full_dn )
     3519            continue;
     3520        if( full_up && tr_torrentIsSeed( tor ) )
    35153521            continue;
    35163522
Note: See TracChangeset for help on using the changeset viewer.