Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup
  • Loading branch information
ronag committed Dec 18, 2020
commit b37e0dfb2b54ee17f87f6e6e80eecb0508f106c9
2 changes: 1 addition & 1 deletion lib/internal/streams/readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ Readable.prototype.unpipe = function(dest) {
return this;

state.pipes.splice(index, 1);
if (state.pipes.length === 0 && !state.ended)
if (state.pipes.length === 0)
this.pause();

dest.emit('unpipe', this, unpipeInfo);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-stream-pipe-needDrain.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Writable = require('_stream_writable');
}
});

r.on('pause', common.mustCall());
r.on('pause', common.mustCall(2));
r.on('end', common.mustCall());

r.pipe(w);
Expand Down