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

Commit

Permalink
Browse files Browse the repository at this point in the history
net_uv: Don't error on ECONNRESET
Fixes #1571.
  • Loading branch information
ry committed Aug 23, 2011
1 parent 80dd818 commit c4454d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -191,6 +191,7 @@ UVTEST += simple/test-readuint
UVTEST += simple/test-regress-GH-746
UVTEST += simple/test-regress-GH-819
UVTEST += simple/test-regress-GH-897
UVTEST += simple/test-regress-GH-1531
UVTEST += simple/test-regression-object-prototype
UVTEST += simple/test-repl
UVTEST += simple/test-require-cache
Expand Down
6 changes: 5 additions & 1 deletion lib/net_uv.js
Expand Up @@ -316,7 +316,11 @@ function onread(buffer, offset, length) {
if (self.onend) self.onend();
} else {
// Error
self.destroy(errnoException(errno, 'read'));
if (errno == 'ECONNRESET') {
self.destroy();
} else {
self.destroy(errnoException(errno, 'read'));
}
}
}

Expand Down

0 comments on commit c4454d2

Please sign in to comment.