Ignore:
Timestamp:
Apr 2, 2011, 8:35:47 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) don't bother calling rechokeUploads() and rechokeDownloads() on torrents which have no peers.

File:
1 edited

Legend:

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

    r12280 r12299  
    31573157    while(( tor = tr_torrentNext( mgr->session, tor ))) {
    31583158        if( tor->isRunning ) {
    3159             rechokeUploads( tor->torrentPeers, now );
     3159            Torrent * t = tor->torrentPeers;
     3160            if( tr_ptrArraySize( &t->peers ) == 0 )
     3161                continue;
     3162            rechokeUploads( t, now );
    31603163            if( !tr_torrentIsSeed( tor ) )
    3161                 rechokeDownloads( tor->torrentPeers );
     3164                rechokeDownloads( t );
    31623165        }
    31633166    }
Note: See TracChangeset for help on using the changeset viewer.