#917: small speedup to r5759 suggested by BentMyWookie

This commit is contained in:
Charles Kerr 2008-05-06 19:39:16 +00:00
parent 9404711233
commit d047c1175d
1 changed files with 2 additions and 0 deletions

View File

@ -1734,6 +1734,8 @@ shouldPeerBeClosed( const Torrent * t, const tr_peer * peer, int peerCount )
int peerHasEverything;
if( atom->flags & ADDED_F_SEED_FLAG )
peerHasEverything = TRUE;
else if( peer->progress < tr_cpPercentDone( tor->completion ) )
peerHasEverything = FALSE;
else {
tr_bitfield * tmp = tr_bitfieldDup( tr_cpPieceBitfield( tor->completion ) );
tr_bitfieldDifference( tmp, peer->have );