-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
Version: 2.7.1
Code:
redis.createClient(redisUrl, {
connect_timeout: 60 * 1000,
retry_strategy: function (options) {
if (options.error && options.error.code === 'ECONNREFUSED') {
return new Error('The server refused the connection');
}
if (options.total_retry_time > 1000 * 60) {
return new Error('Retry time exhausted');
}
if (options.attempt > 10) {
return undefined;
}
return 60000;
}
})
I just expect that the node redis could detect the disconnection in 1 mins and reconnect to redis server in given time successfully when the redis server is ready, but this code dose not work on my Linux env (Ubuntu 18.04), it could work on my Mac env, so could any experts give some help?
knoxcard