ban self-connections, in order to not try them again
This commit is contained in:
@@ -2775,6 +2775,7 @@ namespace libtorrent
|
||||
|
||||
if (pid == m_ses.get_peer_id())
|
||||
{
|
||||
if (peer_info_struct()) peer_info_struct()->banned = true;
|
||||
disconnect("closing connection to ourself", 1);
|
||||
return;
|
||||
}
|
||||
@@ -2791,6 +2792,7 @@ namespace libtorrent
|
||||
// since it most likely is ourself then
|
||||
if (pid == m_ses.get_peer_id())
|
||||
{
|
||||
if (peer_info_struct()) peer_info_struct()->banned = true;
|
||||
disconnect("closing connection to ourself", 1);
|
||||
return;
|
||||
}
|
||||
|
@@ -4173,6 +4173,7 @@ namespace libtorrent
|
||||
{
|
||||
// if the remote endpoint is the same as the local endpoint, we're connected
|
||||
// to ourselves
|
||||
if (m_peer_info) m_peer_info->banned = true;
|
||||
disconnect("connected to ourselves", 1);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user