This commit is contained in:
Belen Curcio
2016-11-17 14:59:58 -03:00
parent 21f83c6f9a
commit 9df1da7a5d
+1 -5
View File
@@ -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!');