From: Matt Joiner Date: Sun, 16 Nov 2014 19:54:00 +0000 (-0600) Subject: Prevent clients from connecting to other clients with the same ID X-Git-Tag: v1.0.0~1538 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c1721b61efd3a30bdae6d62ea0095f45e51e7832;p=btrtrc.git Prevent clients from connecting to other clients with the same ID --- diff --git a/client.go b/client.go index 8c9e64df..e5466e22 100644 --- a/client.go +++ b/client.go @@ -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