net_uv: Don't error on ECONNRESET

Fixes #1571.
This commit is contained in:
Ryan Dahl committed 2011-08-22 19:11:38 -07:00
1 parent 80dd818290
commit c4454d2efc
2 files changed
+6 -1

No files matched your search

+1
View File
@@ -191,6 +191,7 @@ UVTEST += simple/test-readuint
UVTEST += simple/test-regress-GH-746 UVTEST += simple/test-regress-GH-746
UVTEST += simple/test-regress-GH-819 UVTEST += simple/test-regress-GH-819
UVTEST += simple/test-regress-GH-897 UVTEST += simple/test-regress-GH-897
UVTEST += simple/test-regress-GH-1531
UVTEST += simple/test-regression-object-prototype UVTEST += simple/test-regression-object-prototype
UVTEST += simple/test-repl UVTEST += simple/test-repl
UVTEST += simple/test-require-cache UVTEST += simple/test-require-cache
+5 -1
View File
@@ -316,7 +316,11 @@ function onread(buffer, offset, length) {
if (self.onend) self.onend(); if (self.onend) self.onend();
} else { } else {
// Error // Error
self.destroy(errnoException(errno, 'read')); if (errno == 'ECONNRESET') {
self.destroy();
} else {
self.destroy(errnoException(errno, 'read'));
}
} }
} }