From c1721b61efd3a30bdae6d62ea0095f45e51e7832 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 16 Nov 2014 13:54:00 -0600 Subject: [PATCH] Prevent clients from connecting to other clients with the same ID --- client.go | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.48.1