diff --git a/lib/net/pool.js b/lib/net/pool.js index eacb26fe..ce7fbd00 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -510,6 +510,14 @@ Pool.prototype._handleLeech = function _handleLeech(socket) { return; } + // Some kind of weird port collision + // between inbound ports and outbound ports. + if (this.peers.get(addr)) { + this.logger.debug('Port collision (%s).', hostname); + socket.destroy(); + return; + } + this.addLeech(socket); };