Skip to content

Commit

Permalink
stream: Fix flow stalled after unpipe()
Browse files Browse the repository at this point in the history
  • Loading branch information
mpotra committed Oct 15, 2017
1 parent c0a88c8 commit 78e855d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,10 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
if (state.awaitDrain &&
(!dest._writableState || dest._writableState.needDrain))
ondrain();

if (EE.listenerCount(src, 'data') > 0) {
state.flowing = true;
}
}

// If the user pushes more data while we're writing to dest then we'll end up
Expand Down

0 comments on commit 78e855d

Please sign in to comment.