Do not try to send commands to an unoconnected redis client

This changes "Cannot read property 'HGET' of null" messages into
"Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED".
This commit is contained in:
Sandro Santilli 2013-02-11 15:05:23 +01:00
parent 031c6ee0cd
commit a79b999e7a

View File

@ -223,6 +223,7 @@ module.exports = function() {
redis_pool.acquire(db, this);
},
function executeQuery(err, data) {
if ( err ) throw err;
redisClient = data;
redisArgs.push(this);
redisClient[redisFunc.toUpperCase()].apply(redisClient, redisArgs);