Prevent clients from connecting to other clients with the same ID

This commit is contained in:
Matt Joiner 2014-11-16 13:54:00 -06:00
parent dcac7db0f0
commit c1721b61ef
1 changed files with 3 additions and 0 deletions

View File

@ -586,6 +586,9 @@ func (me *Client) runConnection(sock net.Conn, torrent *torrent, discovery peerS
if !ok {
return
}
if hsRes.peerID == me.peerID {
return
}
torrent = me.torrent(hsRes.InfoHash)
if torrent == nil {
return