diff --git a/lib/cartodb/redis_pool.js b/lib/cartodb/redis_pool.js index ea5c1bd5..d2c40cc2 100644 --- a/lib/cartodb/redis_pool.js +++ b/lib/cartodb/redis_pool.js @@ -58,8 +58,11 @@ var RedisPool = function(opts){ client.send_anyway = true; client.select(database); client.send_anyway = false; + callback(null, client); }); - return callback(null, client); + client.on('error', function (err) { + callback(err, null); + }); }, destroy: function(client) { return client.quit();