From ec893541daa50421abc1ec2d6d256fe043b05567 Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Sat, 17 Oct 2015 22:35:13 +0500 Subject: [PATCH] tiny code-style fix --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index a251e18..389c0af 100644 --- a/index.js +++ b/index.js @@ -57,7 +57,9 @@ function requestAsEventEmitter(opts) { setImmediate(function () { ee.emit('response', typeof unzipResponse === 'function' ? unzipResponse(res) : res); }); - }).once('error', function (err) { + }); + + req.once('error', function (err) { if (retryCount < opts.retries) { setTimeout(get, backoff(retryCount++), opts); return;