From 8417870f513e6f1ab98e07fe95d3430dbec48b87 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 14 Apr 2011 00:01:23 -0700 Subject: [PATCH] Don't emit error on ECONNRESET - just close Fix #670 --- lib/net.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/net.js b/lib/net.js index e96e3c6900a..8d88c69bba8 100644 --- a/lib/net.js +++ b/lib/net.js @@ -635,7 +635,11 @@ Socket.prototype._onReadable = function() { pool.length - pool.used); DTRACE_NET_SOCKET_READ(this, bytesRead); } catch (e) { - self.destroy(e); + if (e.code == 'ECONNRESET') { + self.destroy(); + } else { + self.destroy(e); + } return; }