Don't attach peers to inactive torrents (should fix the CLOSE_WAIT connection leaks)

This commit is contained in:
Eric Petit 2006-09-26 11:16:40 +00:00
parent c7265daeeb
commit 8a7edafb4e
1 changed files with 6 additions and 0 deletions

View File

@ -828,6 +828,12 @@ static void acceptLoop( void * _h )
for( tor = h->torrentList; tor; tor = tor->next )
{
tr_lockLock( &tor->lock );
if( tor->status & TR_STATUS_INACTIVE )
{
tr_lockUnlock( &tor->lock );
continue;
}
if( 0 == memcmp( tor->info.hash, hash,
SHA_DIGEST_LENGTH ) )
{