Do not leak redis client connections on redis command error
This commit is contained in:
parent
b130b67f24
commit
ac49abe750
@ -232,8 +232,7 @@ module.exports = function() {
|
||||
redisClient[redisFunc.toUpperCase()].apply(redisClient, redisArgs);
|
||||
},
|
||||
function releaseRedisClient(err, data) {
|
||||
if (err) throw err;
|
||||
redis_pool.release(db, redisClient);
|
||||
if ( ! _.isUndefined(redisClient) ) redis_pool.release(db, redisClient);
|
||||
callback(err, data);
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user