diff --git a/lib/imap-notifier.js b/lib/imap-notifier.js index bf0edd37..d80b7459 100644 --- a/lib/imap-notifier.js +++ b/lib/imap-notifier.js @@ -14,7 +14,7 @@ class ImapNotifier extends EventEmitter { super(); this.database = options.database; - this.publisher = options.redis || redis.createClient(tools.redisConfig(config.redis)); + this.publisher = options.redis || redis.createClient(tools.redisConfig(config.dbs.redis)); this.cachedcounter = counters(this.publisher).cachedcounter; this.logger = options.logger || { @@ -29,7 +29,7 @@ class ImapNotifier extends EventEmitter { } // Subscriber needs its own client connection. This is relevant only in the context of IMAP - this.subsriber = redis.createClient(tools.redisConfig(config.redis)); + this.subsriber = redis.createClient(tools.redisConfig(config.dbs.redis)); this._listeners = new EventEmitter(); this._listeners.setMaxListeners(0);