Merge pull request #251 from seejohnrun/handle-redis-disconnect
Handle redis error and re-establish connection
This commit is contained in:
commit
f3838ab4a8
@ -29,6 +29,11 @@ RedisDocumentStore.connect = function(options) {
|
||||
if (options.password) {
|
||||
RedisDocumentStore.client.auth(options.password);
|
||||
}
|
||||
|
||||
RedisDocumentStore.client.on('error', function(err) {
|
||||
winston.error('redis disconnected', err);
|
||||
});
|
||||
|
||||
RedisDocumentStore.client.select(index, function(err) {
|
||||
if (err) {
|
||||
winston.error(
|
||||
|
Loading…
Reference in New Issue
Block a user