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

Formatting

This commit is contained in:
Tomasz Durka
2013-03-17 23:45:51 +01:00
parent 38dbacac9f
commit 0698a5e627
2 changed files with 28 additions and 28 deletions

View File

@@ -55,10 +55,10 @@ function RedisClient(stream, options) {
if (typeof this.options.enable_offline_queue === "boolean") {
this.enable_offline_queue = this.options.enable_offline_queue;
}
this.retry_max_delay = null;
if (options.retry_max_delay !== undefined && !isNaN(options.retry_max_delay) && options.retry_max_delay > 0) {
this.retry_max_delay = options.retry_max_delay;
}
this.retry_max_delay = null;
if (options.retry_max_delay !== undefined && !isNaN(options.retry_max_delay) && options.retry_max_delay > 0) {
this.retry_max_delay = options.retry_max_delay;
}
this.initialize_retry_vars();
this.pub_sub_mode = false;
@@ -432,11 +432,11 @@ RedisClient.prototype.connection_gone = function (why) {
return;
}
if (this.retry_max_delay !== null && this.retry_delay > this.retry_max_delay) {
this.retry_delay = this.retry_max_delay;
} else {
this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff);
}
if (this.retry_max_delay !== null && this.retry_delay > this.retry_max_delay) {
this.retry_delay = this.retry_max_delay;
} else {
this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff);
}
if (exports.debug_mode) {
console.log("Retry connection in " + this.retry_delay + " ms");