Skip to content

Commit

Permalink
Stream.prototype.pipe: Don't stop piping when the destination stream …
Browse files Browse the repository at this point in the history
…emits 'end'.

The 'end' event has nothing to do with the "writable stream-ness" of an object,
and the current behavior breaks a number of use cases with readable/writable
streams.

As far as I can tell the offending line was introduced by accident in 2a65d29.
  • Loading branch information
papandreou committed Mar 15, 2012
1 parent d2fba2b commit 1145158
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ Stream.prototype.pipe = function(dest, options) {
source.on('end', cleanup);
source.on('close', cleanup);

dest.on('end', cleanup);
dest.on('close', cleanup);

dest.emit('pipe', source);
Expand Down

0 comments on commit 1145158

Please sign in to comment.