From d7897f9c6168432e0b24f298724137c711ec1e37 Mon Sep 17 00:00:00 2001 From: Dao Lam Date: Wed, 13 Mar 2019 20:31:50 -0700 Subject: [PATCH] fix: retry (#53) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 5f8d028..6644e70 100644 --- a/index.js +++ b/index.js @@ -64,7 +64,7 @@ class ExecutorQueue extends Executor { this.redis[funcName](...args), breaker); this.requestBreaker = new Breaker(requestretry, config.breaker); this.requestRetryStrategy = (err, response) => - response.statusCode === 201 || response.statusCode === 200; + err || (response.statusCode !== 201 && response.statusCode !== 200); this.fuseBox = new FuseBox(); this.fuseBox.addFuse(this.queueBreaker);