mirror of
https://github.com/transmission/transmission
synced 2025-02-05 05:53:59 +00:00
don't let incoming peer connections sneak past MAX_CONNECTED_PEERS_PER_TORRENT.
This commit is contained in:
parent
b382628933
commit
e168cf3f69
1 changed files with 4 additions and 0 deletions
|
@ -932,6 +932,10 @@ myHandshakeDoneCB( tr_handshake * handshake,
|
|||
tordbg( t, "banned peer %s tried to reconnect", tr_peerIoAddrStr(&atom->addr,atom->port) );
|
||||
tr_peerIoFree( io );
|
||||
}
|
||||
else if( tr_ptrArraySize( t->peers ) >= MAX_CONNECTED_PEERS_PER_TORRENT )
|
||||
{
|
||||
tr_peerIoFree( io );
|
||||
}
|
||||
else
|
||||
{
|
||||
tr_peer * peer = getExistingPeer( t, addr );
|
||||
|
|
Loading…
Reference in a new issue