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: don't call end if destroyed
  • Loading branch information
ronag committed Feb 22, 2020
commit 86f40d3942473a41c1e4e5409b19d3f6276d0d8e
5 changes: 2 additions & 3 deletions lib/internal/streams/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,11 @@ function pipeline(...streams) {
const pt = new PassThrough();
if (isPromise(ret)) {
ret
.catch((err) => {
pt.destroy(err);
})
.then((val) => {
value = val;
pt.end(val);
Comment thread
ronag marked this conversation as resolved.
}, (err) => {
pt.destroy(err);
});
} else if (isIterable(ret, true)) {
pump(ret, pt, finish);
Expand Down