Check redis connection at pool creation time

This commit is contained in:
Sandro Santilli 2013-01-28 17:12:21 +01:00
parent 093d3de66e
commit b130b67f24

View File

@ -58,8 +58,11 @@ var RedisPool = function(opts){
client.send_anyway = true;
client.select(database);
client.send_anyway = false;
callback(null, client);
});
client.on('error', function (err) {
callback(err, null);
});
return callback(null, client);
},
destroy: function(client) {
return client.quit();