fix(p2p): additional check of dublicated peers
This commit is contained in:
parent
c129b9717e
commit
726afd750c
@ -384,6 +384,15 @@ class p2p {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(let peer of this.peers) {
|
||||||
|
if(peer.peerId === data.peerId) {
|
||||||
|
// already connected from different interface
|
||||||
|
logT('p2p', 'peer', data.peerId, 'already connected from different address', '( check:', peer.files === data.files && peer.torrents === data.torrents, ')');
|
||||||
|
rawSocket.destroy()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// success
|
// success
|
||||||
clearTimeout(protocolTimeout)
|
clearTimeout(protocolTimeout)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user