Check redis connection at pool creation time

remotes/origin/use_db_slaves
Sandro Santilli 12 years ago
parent 093d3de66e
commit b130b67f24

@ -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();

Loading…
Cancel
Save