Skip to content

Commit

Permalink
stream: pass error on legacy destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
greguz committed Jun 21, 2022
1 parent 08d6a82 commit 10be672
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/streams/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function destroyer(stream, err) {
// TODO: Don't lose err?
stream.close();
} else if (err) {
process.nextTick(emitErrorCloseLegacy, stream);
process.nextTick(emitErrorCloseLegacy, stream, err);
} else {
process.nextTick(emitCloseLegacy, stream);
}
Expand Down

0 comments on commit 10be672

Please sign in to comment.