From 9df1da7a5d020a707d9aa031cd62c38a7825aefc Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 17 Nov 2016 14:59:58 -0300 Subject: [PATCH] changes --- redis.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/redis.js b/redis.js index 0f2f211f9..c37fcc64e 100644 --- a/redis.js +++ b/redis.js @@ -4,7 +4,7 @@ const url = process.env.TALK_REDIS_URL || 'redis://localhost'; const client = redis.createClient(url, { retry_strategy: function(options) { - if (options.error.code === 'ECONNREFUSED') { + if (options.error && options.error.code === 'ECONNREFUSED') { // End reconnecting on a specific error and flush all commands with a individual error return new Error('The server refused the connection'); @@ -26,10 +26,6 @@ const client = redis.createClient(url, { } }); -// client.on('error', (err) => { -// throw err; -// }); - client.ping((err) => { if (err) { console.error('Can\'t ping the redis server!');