Check redis connection at pool creation time
This commit is contained in:
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);
|
||||
});
|
||||
client.on('error', function (err) {
|
||||
callback(err, null);
|
||||
});
|
||||
return callback(null, client);
|
||||
},
|
||||
destroy: function(client) {
|
||||
return client.quit();
|
||||
|
Loading…
Reference in New Issue
Block a user