(trunk libT) don't bother calling rechokeUploads() and rechokeDownloads() on torrents which have no peers.
This commit is contained in:
parent
616bde8c5b
commit
4a47e3c869
|
@ -3156,9 +3156,12 @@ rechokePulse( int foo UNUSED, short bar UNUSED, void * vmgr )
|
|||
|
||||
while(( tor = tr_torrentNext( mgr->session, tor ))) {
|
||||
if( tor->isRunning ) {
|
||||
rechokeUploads( tor->torrentPeers, now );
|
||||
Torrent * t = tor->torrentPeers;
|
||||
if( tr_ptrArraySize( &t->peers ) == 0 )
|
||||
continue;
|
||||
rechokeUploads( t, now );
|
||||
if( !tr_torrentIsSeed( tor ) )
|
||||
rechokeDownloads( tor->torrentPeers );
|
||||
rechokeDownloads( t );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue