diff --git a/index.js b/index.js index 395c23f01d..c458458ef1 100644 --- a/index.js +++ b/index.js @@ -478,8 +478,8 @@ RedisClient.prototype.connection_gone = function (why) { } 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; } else { this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff);