Skip to content

Commit

Permalink
fixup! got error event before error callback
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyes committed Oct 28, 2020
1 parent 114362b commit 6e1c697
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 @@ -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) {
Expand Down

0 comments on commit 6e1c697

Please sign in to comment.