From dbaae3070006a83718af58199a158cbe6835ad4b Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 10 Jan 2017 18:03:02 -0800 Subject: [PATCH] net: only add timeouts for outbound peers. --- lib/net/peer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/net/peer.js b/lib/net/peer.js index cd1c695c..d657c999 100644 --- a/lib/net/peer.js +++ b/lib/net/peer.js @@ -1093,6 +1093,9 @@ Peer.prototype.maybeStall = function maybeStall() { Peer.prototype.addTimeout = function addTimeout(packet) { var timeout = Peer.RESPONSE_TIMEOUT; + if (!this.outbound) + return; + switch (packet.type) { case packetTypes.MEMPOOL: this.request(packetTypes.INV, timeout);