Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…he stream API
  • Loading branch information...
commit 4483eca117675e65334fc9b4db0f57c38e29e2d7 1 parent 4ba0f88
@jhs jhs authored
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
}
Please sign in to comment.
Something went wrong with that request. Please try again.