diff --git a/lib/clients/http_client.js b/lib/clients/http_client.js index 41a8b85da..f416e72ab 100644 --- a/lib/clients/http_client.js +++ b/lib/clients/http_client.js @@ -158,6 +158,9 @@ function rawRequest(opts, cb) { req.removeAllListeners('error'); req.removeAllListeners('socket'); + + // error event wrapper should always present, if absent, native http module breaks app + req.on('error', function (err2) { err = err2 }); req.emit('result', (err || null), res); }); req.log = log;