Skip to content
Browse files

Explicitly return false from the error emitter, so .write() matches t…

…he stream API
  • Loading branch information...
1 parent 4ba0f88 commit 4483eca117675e65334fc9b4db0f57c38e29e2d7 @jhs jhs committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/stream.js
View
3 lib/stream.js
@@ -302,4 +302,7 @@ Changes.prototype.error = function(er) {
self.readable = false
self.writable = false
self.emit('error', er)
+
+ // The write() method sometimes returns this value, so if there was an error, make write() return false.
+ return false
}

0 comments on commit 4483eca

Please sign in to comment.
Something went wrong with that request. Please try again.