diff --git a/lib/_http_client.js b/lib/_http_client.js index 1d949559d96d93..f024c7fc89b150 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -327,7 +327,7 @@ ClientRequest.prototype._implicitHeader = function _implicitHeader() { ClientRequest.prototype.abort = function abort() { if (!this.aborted) { - process.nextTick(emitAbortNT.bind(this)); + process.nextTick(emitAbortNT, this); } this.aborted = true; @@ -345,8 +345,8 @@ ClientRequest.prototype.abort = function abort() { }; -function emitAbortNT() { - this.emit('abort'); +function emitAbortNT(req) { + req.emit('abort'); } function ondrain() {