diff --git a/lib/_http_client.js b/lib/_http_client.js index 9d10a64e4dc76d..676ed3b2c50aaa 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -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;