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

Rework connect_timeout

This commit is contained in:
Ruben Bridgewater
2016-12-17 17:47:15 +01:00
committed by Ruben Bridgewater
parent 59725e3f20
commit 597bed6229
2 changed files with 3 additions and 4 deletions

View File

@@ -92,9 +92,8 @@ function RedisClient (options, stream) {
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.pipeline_queue = new Queue(); // Holds all pipelined commands
// ATTENTION: connect_timeout should change in v.3.0 so it does not count towards ending reconnection attempts after x seconds
// This should be done by the retry_strategy. Instead it should only be the timeout for connecting to redis
this.connect_timeout = +options.connect_timeout || 3600000; // 60 * 60 * 1000 ms
// Only used as timeout until redis has to be connected to redis until throwing an connection error
this.connect_timeout = +options.connect_timeout || 60000; // 60 * 1000 ms
this.enable_offline_queue = options.enable_offline_queue === false ? false : true;
this.initialize_retry_vars();
this.pub_sub_mode = 0;