projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8d40be
)
net_uv: handle read errors
author
Ryan Dahl
<ry@tinyclouds.org>
Mon, 22 Aug 2011 22:03:27 +0000
(15:03 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Mon, 22 Aug 2011 22:03:27 +0000
(15:03 -0700)
lib/net_uv.js
patch
|
blob
|
history
diff --git
a/lib/net_uv.js
b/lib/net_uv.js
index 44768238736d0fc234e63325327352b946642108..7a97e46e21ed7267b5e437944c0e537bb01f2b58 100644
(file)
--- a/
lib/net_uv.js
+++ b/
lib/net_uv.js
@@
-300,7
+300,7
@@
function onread(buffer, offset, length) {
// Optimization: emit the original buffer with end points
if (self.ondata) self.ondata(buffer, offset, end);
- } else {
+ } else
if (errno == 'EOF')
{
// EOF
self.readable = false;
@@
-314,6
+314,9
@@
function onread(buffer, offset, length) {
if (!self.allowHalfOpen) self.end();
if (self._events && self._events['end']) self.emit('end');
if (self.onend) self.onend();
+ } else {
+ // Error
+ self.destroy(errnoException(errno, 'read'));
}
}