Skip to content

Commit 1dc7aba

Browse files
committed
http: don't emit error after destroy
1 parent d881fcb commit 1dc7aba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/_http_outgoing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ function onError(msg, err, callback) {
919919

920920
function emitErrorNt(msg, err, callback) {
921921
callback(err);
922-
if (typeof msg.emit === 'function' && !msg._closed) {
922+
if (typeof msg.emit === 'function' && !msg._closed && !msg.destroyed) {
923923
msg.emit('error', err);
924924
}
925925
}

0 commit comments

Comments
 (0)