Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Don't emit error on ECONNRESET - just close
Browse files Browse the repository at this point in the history
Fix #670
  • Loading branch information
ry committed Apr 14, 2011
1 parent 6110078 commit 8417870
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8417870

Please sign in to comment.