Don't attach peers to inactive torrents (should fix the CLOSE_WAIT connection leaks)
This commit is contained in:
parent
c7265daeeb
commit
8a7edafb4e
|
@ -828,6 +828,12 @@ static void acceptLoop( void * _h )
|
||||||
for( tor = h->torrentList; tor; tor = tor->next )
|
for( tor = h->torrentList; tor; tor = tor->next )
|
||||||
{
|
{
|
||||||
tr_lockLock( &tor->lock );
|
tr_lockLock( &tor->lock );
|
||||||
|
if( tor->status & TR_STATUS_INACTIVE )
|
||||||
|
{
|
||||||
|
tr_lockUnlock( &tor->lock );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( 0 == memcmp( tor->info.hash, hash,
|
if( 0 == memcmp( tor->info.hash, hash,
|
||||||
SHA_DIGEST_LENGTH ) )
|
SHA_DIGEST_LENGTH ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue