Skip to content
Closed
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
Next Next commit
fixup: simplify
  • Loading branch information
ronag committed Apr 21, 2020
commit 6b92c9960cd90763efb5a8db7d79e5a78cc62479
5 changes: 2 additions & 3 deletions lib/internal/streams/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ function destroyer(stream, reading, writing, callback) {
});

return once((err) => {
if (!finished) {
destroyImpl.destroyer(stream, err);
}
if (finished) return;
destroyImpl.destroyer(stream, err);
callback(err || new ERR_STREAM_DESTROYED('pipe'));
});
}
Expand Down