Hello:
I think it would be great if the client would emit an event when it gives up trying to reconnect to a dead Redis instance because a user configured it to do so using connect_timeout or max_attempts attributes.
I mean updating this code:
if (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) {
self.retry_timer = null;
// 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;
}
to look something like this:
if (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) {
self.retry_timer = null;
self.emit('reconnectionGiveup');
return;
}
and the same for the max_attemps case.
Hello:
I think it would be great if the client would emit an event when it gives up trying to reconnect to a dead Redis instance because a user configured it to do so using connect_timeout or max_attempts attributes.
I mean updating this code:
to look something like this:
and the same for the max_attemps case.