From 52dd3c2cdc098ef904f18c8106cd58742400691b Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 27 Jul 2016 05:51:49 -0700 Subject: [PATCH] peer: error handling. --- lib/bcoin/peer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bcoin/peer.js b/lib/bcoin/peer.js index 810bc4bb..02e2b652 100644 --- a/lib/bcoin/peer.js +++ b/lib/bcoin/peer.js @@ -209,6 +209,7 @@ Peer.prototype._init = function init() { case 'EHOSTUNREACH': case 'ENETUNREACH': case 'ENOTFOUND': + case 'ECONNRESET': self.ignore(); break; } @@ -216,7 +217,6 @@ Peer.prototype._init = function init() { this.socket.once('close', function() { self._error('socket hangup'); - self.connected = false; }); this.socket.on('data', function(chunk) {