Commit bf2b1c95 authored by John Crepezzi's avatar John Crepezzi
Browse files

Handle redis error and re-establish connection

parent ad7702aa
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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(