Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/ExpressRedisCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ module.exports = (function () {
this.emit('disconnected', { host: this.host, port: this.port });
this.emit('message', 'Disconnected from redis://' + this.client.host + ':' + this.client.port);
}.bind(this));

if ( this.client.connected ) {
this.client.emit('connect');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think resending connect on client is not good idea. Because there could be some subscribers that will not expect this.
You should better directly set self.connected.

}
}
}

Expand Down