diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 7394cc4a40ec19..a92eaa3293c51c 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -685,10 +685,10 @@ function onError(msg, err, callback) { } function emitErrorNt(msg, err, callback) { - callback(err); if (typeof msg.emit === 'function' && !msg._closed) { msg.emit('error', err); } + callback(err); } function write_(msg, chunk, encoding, callback, fromEnd) {