From 18d5f604f583db773e5203aa7960b799aed959bc Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Thu, 10 Nov 2016 15:55:25 +0000 Subject: [PATCH] Update retry_strategy example Presumably `Math.min()` was intended, otherwise the `options.attempt * 100` result would be ignored for the first 30 attempts. IMHO the initial retries should be quick, but then the delay should be capped at a reasonable interval. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52b60f0f284..71b6bc73a06 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ var client = redis.createClient({ return undefined; } // reconnect after - return Math.max(options.attempt * 100, 3000); + return Math.min(options.attempt * 100, 3000); } }); ```