1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

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.
This commit is contained in:
Mark Wubben
2016-11-10 15:55:25 +00:00
committed by GitHub
parent be07c12fbd
commit 18d5f604f5

View File

@@ -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);
}
});
```