diff options
Diffstat (limited to 'lib/_http_client.js')
-rw-r--r-- | lib/_http_client.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/_http_client.js b/lib/_http_client.js index e095051270..29ea688ecb 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -319,12 +319,13 @@ ClientRequest.prototype.abort = function abort() { this.aborted = Date.now(); // If we're aborting, we don't care about any more response data. - if (this.res) + if (this.res) { this.res._dump(); - else + } else { this.once('response', function(res) { res._dump(); }); + } // In the event that we don't have a socket, we will pop out of // the request queue through handling in onSocket. |