From bee5276bf750a808f76552f2bd559b7cba6dd91d Mon Sep 17 00:00:00 2001 From: Tom Jenkinson Date: Thu, 17 Oct 2019 20:01:49 +0100 Subject: [PATCH 1/2] remove unneeded resolve() --- lib/circuit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/circuit.js b/lib/circuit.js index 337e79d3..e3a90481 100644 --- a/lib/circuit.js +++ b/lib/circuit.js @@ -476,8 +476,8 @@ class CircuitBreaker extends EventEmitter { const latency = Date.now() - latencyStartTime; this.semaphore.release(); this.emit('timeout', error, latency, args); - resolve(handleError( - error, this, timeout, args, latency, resolve, reject)); + handleError( + error, this, timeout, args, latency, resolve, reject); }, this.options.timeout); } From 570c74db1d9936d73f88b598989a4172a657bd4a Mon Sep 17 00:00:00 2001 From: Tom Jenkinson Date: Thu, 17 Oct 2019 20:03:48 +0100 Subject: [PATCH 2/2] lint --- lib/circuit.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/circuit.js b/lib/circuit.js index e3a90481..a1856343 100644 --- a/lib/circuit.js +++ b/lib/circuit.js @@ -476,8 +476,7 @@ class CircuitBreaker extends EventEmitter { const latency = Date.now() - latencyStartTime; this.semaphore.release(); this.emit('timeout', error, latency, args); - handleError( - error, this, timeout, args, latency, resolve, reject); + handleError(error, this, timeout, args, latency, resolve, reject); }, this.options.timeout); }