From c5fefb752ea0131d8f4261e1bb4fcc9c516851c6 Mon Sep 17 00:00:00 2001 From: luin Date: Thu, 26 Jan 2017 12:05:46 +0800 Subject: [PATCH] perf: increase the default reconnection interval Closes #414 --- README.md | 2 +- lib/redis.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dc13a0ef..37030ab7 100644 --- a/README.md +++ b/README.md @@ -504,7 +504,7 @@ using the `retryStrategy` option: var redis = new Redis({ // This is the default value of `retryStrategy` retryStrategy: function (times) { - var delay = Math.min(times * 2, 2000); + var delay = Math.min(times * 50, 2000); return delay; } }); diff --git a/lib/redis.js b/lib/redis.js index 13f86f20..e18958f4 100644 --- a/lib/redis.js +++ b/lib/redis.js @@ -154,7 +154,7 @@ Redis.defaultOptions = { family: 4, connectTimeout: 3000, retryStrategy: function (times) { - return Math.min(times * 2, 2000); + return Math.min(times * 50, 2000); }, keepAlive: 0, noDelay: true, diff --git a/package.json b/package.json index 06c9a02f..14d53764 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "flexbuffer": "0.0.6", "lodash": "^4.8.2", "redis-commands": "^1.2.0", - "redis-parser": "^2.3.0" + "redis-parser": "^2.4.0" }, "devDependencies": { "chai": "^3.5.0",