You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Make retry_max_delay option work correctly when retry_backoff becomes greater than one
This commit is contained in:
committed by
Bryce Baril
parent
31c22be6b9
commit
a4f266684e
4
index.js
4
index.js
@@ -478,8 +478,8 @@ RedisClient.prototype.connection_gone = function (why) {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.retry_max_delay !== null && this.retry_delay > this.retry_max_delay) {
|
if (this.retry_max_delay !== null && (this.retry_delay * this.retry_backoff) > this.retry_max_delay) {
|
||||||
this.retry_delay = this.retry_max_delay;
|
this.retry_delay = this.retry_max_delay;
|
||||||
} else {
|
} else {
|
||||||
this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff);
|
this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff);
|
||||||
|
Reference in New Issue
Block a user