You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Update TODO comment for retry thresholds.
This commit is contained in:
9
index.js
9
index.js
@@ -381,8 +381,9 @@ RedisClient.prototype.connection_gone = function (why) {
|
||||
|
||||
if (this.max_attempts && this.attempts >= this.max_attempts) {
|
||||
this.retry_timer = null;
|
||||
// TODO - engage Redis is Broken mode for future commands
|
||||
this.emit("not_reconnecting", "Aborting connection attempt: Max attempts " + this.max_attempts + " failed.");
|
||||
// TODO - some people need a "Redis is Broken mode" for future commands that errors immediately, and others
|
||||
// want the program to exit. Right now, we just log, which doesn't really help in either case.
|
||||
console.error("node_redis: Couldn't get Redis connection after " + this.max_attempts + " attempts.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -400,8 +401,8 @@ RedisClient.prototype.connection_gone = function (why) {
|
||||
|
||||
if (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) {
|
||||
self.retry_timer = null;
|
||||
// TODO - engage Redis is Broken mode for future commands
|
||||
self.emit("not_reconnecting", "Aborting connection attempt: Total timeout of " + self.connect_timeout + "ms exceeded.");
|
||||
// TODO - engage Redis is Broken mode for future commands, or whatever
|
||||
console.error("node_redis: Couldn't get Redis connection after " + self.retry_totaltime + "ms.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user