mirror of
https://github.com/transmission/transmission
synced 2025-02-22 22:20:39 +00:00
(trunk libT) in peer-mgr's closeBadPeers() function, don't bother doing any of the setup/teardown calculations if the peer array is empty.
This commit is contained in:
parent
35eb016209
commit
6a53f72481
1 changed files with 9 additions and 6 deletions
|
@ -3320,12 +3320,15 @@ removeAllPeers( Torrent * t )
|
||||||
static void
|
static void
|
||||||
closeBadPeers( Torrent * t, const time_t now_sec )
|
closeBadPeers( Torrent * t, const time_t now_sec )
|
||||||
{
|
{
|
||||||
int i;
|
if( !tr_ptrArrayEmpty( &t->peers ) )
|
||||||
int peerCount;
|
{
|
||||||
struct tr_peer ** peers = getPeersToClose( t, now_sec, &peerCount );
|
int i;
|
||||||
for( i=0; i<peerCount; ++i )
|
int peerCount;
|
||||||
closePeer( t, peers[i] );
|
struct tr_peer ** peers = getPeersToClose( t, now_sec, &peerCount );
|
||||||
tr_free( peers );
|
for( i=0; i<peerCount; ++i )
|
||||||
|
closePeer( t, peers[i] );
|
||||||
|
tr_free( peers );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct peer_liveliness
|
struct peer_liveliness
|
||||||
|
|
Loading…
Reference in a new issue