Permalink
Browse files

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

…he stream API
  • Loading branch information...
jhs committed Apr 3, 2012
1 parent 4ba0f88 commit 4483eca117675e65334fc9b4db0f57c38e29e2d7
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/stream.js
View
@@ -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.