Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Mar 8, 2020
1 parent 88ce624 commit 2746f70
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,7 @@ function socketErrorListener(err) {
const req = socket._httpMessage;
debug('SOCKET ERROR:', err.message, err.stack);

// If writableFinished then the error came from the readable/response
// side and will be emitted there.
if (req && !req.writableFinished) {
if (req) {
// For Safety. Some additional errors might fire later on
// and we need to make sure we don't double-fire the error event.
req.socket._hadError = true;
Expand Down

0 comments on commit 2746f70

Please sign in to comment.