summaryrefslogtreecommitdiff
path: root/lib/_http_client.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-06-20 14:37:00 -0700
committerRich Trott <rtrott@gmail.com>2017-06-23 14:43:20 -0700
commit095c0de94d818088cacf2c33ad4913768c15024a (patch)
tree77eb0aaffa2aa80ba1240280a716eb64c4a7ff1d /lib/_http_client.js
parente3ea0fc97bf3a911463275446024b50e8bae865f (diff)
downloadandroid-node-v8-095c0de94d818088cacf2c33ad4913768c15024a.tar.gz
android-node-v8-095c0de94d818088cacf2c33ad4913768c15024a.tar.bz2
android-node-v8-095c0de94d818088cacf2c33ad4913768c15024a.zip
benchmark,lib,test: use braces for multiline block
For if/else and loops where the bodies span more than one line, use curly braces. PR-URL: https://github.com/nodejs/node/pull/13828 Ref: https://github.com/nodejs/node/pull/13623#discussion_r123048602 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/_http_client.js')
-rw-r--r--lib/_http_client.js5
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.