fix issue of adding duplicate incoming connections indefinitely to peer list when allow_multiple_connections_per_ip is enabled
This commit is contained in:
parent
7d5df3eaa9
commit
2add9d193a
|
@ -1367,6 +1367,17 @@ namespace libtorrent
|
|||
// to still exist when we get back there, to assign the new
|
||||
// peer connection pointer to it. The peer list must
|
||||
// be left intact.
|
||||
|
||||
// if we allow multiple connections per IP, and this peer
|
||||
// was incoming and it never advertised its listen
|
||||
// port, we don't really know which peer it was. In order
|
||||
// to avoid adding one entry for every single connection
|
||||
// the peer makes to us, don't save this entry
|
||||
if (m_torrent->settings().allow_multiple_connections_per_ip
|
||||
&& !p->connectable)
|
||||
{
|
||||
erase_peer(p);
|
||||
}
|
||||
}
|
||||
|
||||
void policy::peer_is_interesting(peer_connection& c)
|
||||
|
|
Loading…
Reference in New Issue