Skip to content

Commit

Permalink
http: don't emit error after destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Oct 19, 2024
1 parent d881fcb commit 1dc7aba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/_http_outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ function onError(msg, err, callback) {

function emitErrorNt(msg, err, callback) {
callback(err);
if (typeof msg.emit === 'function' && !msg._closed) {
if (typeof msg.emit === 'function' && !msg._closed && !msg.destroyed) {
msg.emit('error', err);
}
}
Expand Down

0 comments on commit 1dc7aba

Please sign in to comment.