peer: fix potential error.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
parent
b2c4af302d
commit
e9ec9a5f0c
@ -355,7 +355,7 @@ Peer.prototype._handleGetAddr = function handleGetAddr() {
|
|||||||
port: peer.socket.remotePort || 8333
|
port: peer.socket.remotePort || 8333
|
||||||
};
|
};
|
||||||
}).filter(function(peer) {
|
}).filter(function(peer) {
|
||||||
if (~used.indexOf(peer.host)) return;
|
if (!peer || ~used.indexOf(peer.host)) return;
|
||||||
used.push(peer.host);
|
used.push(peer.host);
|
||||||
return !!peer.host && net.isIP(peer.host);
|
return !!peer.host && net.isIP(peer.host);
|
||||||
}).map(function(peer) {
|
}).map(function(peer) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user