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

Add a connection timeout of 24h as new default for maximum reconnecting

This commit is contained in:
Ruben Bridgewater
2015-09-10 17:59:25 +02:00
parent 04c986a4cd
commit f2ee8dbc9e
2 changed files with 4 additions and 5 deletions

View File

@@ -58,9 +58,7 @@ function RedisClient(stream, options) {
this.command_queue = new Queue(); // holds sent commands to de-pipeline them
this.offline_queue = new Queue(); // holds commands issued but not able to be sent
this.commands_sent = 0;
if (options.connect_timeout && options.connect_timeout > 0) {
this.connect_timeout = +options.connect_timeout;
}
this.connect_timeout = +options.connect_timeout || 86400000; // 24 * 60 * 60 * 1000 ms
this.enable_offline_queue = true;
if (this.options.enable_offline_queue === false) {
this.enable_offline_queue = false;