diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index a19198df0..67bb182dd 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -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; } diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 2b3fda7ab..94311a7f6 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -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; }