1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Lowering the first retry_delay and begin from that value

Earlier the first value was never used, as it was first multiplied by 1.7
This commit is contained in:
Ruben Bridgewater
2015-09-10 16:17:09 +02:00
parent cd5cfb4a8e
commit 04c986a4cd
2 changed files with 3 additions and 3 deletions

View File

@@ -581,12 +581,12 @@ some kind of maximum queue depth for pre-connection commands.
## client.retry_delay
Current delay in milliseconds before a connection retry will be attempted. This starts at `250`.
Current delay in milliseconds before a connection retry will be attempted. This starts at `200`.
## client.retry_backoff
Multiplier for future retry timeouts. This should be larger than 1 to add more time between retries.
Defaults to 1.7. The default initial connection retry is 250, so the second retry will be 425, followed by 723.5, etc.
Defaults to 1.7. The default initial connection retry is 200, so the second retry will be 340, followed by 578, etc.
### Commands with Optional and Keyword arguments

View File

@@ -123,7 +123,7 @@ RedisClient.prototype.install_stream_listeners = function() {
RedisClient.prototype.initialize_retry_vars = function () {
this.retry_timer = null;
this.retry_totaltime = 0;
this.retry_delay = 150;
this.retry_delay = 200;
this.retry_backoff = 1.7;
this.attempts = 1;
};