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:
19ecc3a
)
streams2: Still emit error if there was a write() cb
author
isaacs
<i@izs.me>
Fri, 14 Dec 2012 18:49:16 +0000
(10:49 -0800)
committer
isaacs
<i@izs.me>
Sat, 15 Dec 2012 01:46:23 +0000
(17:46 -0800)
lib/_stream_writable.js
patch
|
blob
|
history
diff --git
a/lib/_stream_writable.js
b/lib/_stream_writable.js
index
7364d3a
..
619603f
100644
(file)
--- a/
lib/_stream_writable.js
+++ b/
lib/_stream_writable.js
@@
-175,8
+175,10
@@
function onwrite(stream, er) {
});
else
cb(er);
- } else
- stream.emit('error', er);
+ }
+
+ // backwards compatibility. still emit if there was a cb.
+ stream.emit('error', er);
return;
}
state.length -= l;