Don't emit error on ECONNRESET - just close

Fix #670
v0.7.4-release
Ryan Dahl 2011-04-14 00:01:23 -07:00
parent 61100788ad
commit 8417870f51
1 changed files with 5 additions and 1 deletions

View File

@ -635,7 +635,11 @@ Socket.prototype._onReadable = function() {
pool.length - pool.used); pool.length - pool.used);
DTRACE_NET_SOCKET_READ(this, bytesRead); DTRACE_NET_SOCKET_READ(this, bytesRead);
} catch (e) { } catch (e) {
self.destroy(e); if (e.code == 'ECONNRESET') {
self.destroy();
} else {
self.destroy(e);
}
return; return;
} }