Prevent clients from connecting to other clients with the same ID
This commit is contained in:
parent
dcac7db0f0
commit
c1721b61ef
|
@ -586,6 +586,9 @@ func (me *Client) runConnection(sock net.Conn, torrent *torrent, discovery peerS
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if hsRes.peerID == me.peerID {
|
||||||
|
return
|
||||||
|
}
|
||||||
torrent = me.torrent(hsRes.InfoHash)
|
torrent = me.torrent(hsRes.InfoHash)
|
||||||
if torrent == nil {
|
if torrent == nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue