Merge pull request #3658 from oswaldoacauan/fix-redis-psubscribe-handler

Fix ´get_all_meetings_request´ being published multiple times
This commit is contained in:
Anton Georgiev 2017-02-14 13:07:39 -05:00 committed by GitHub
commit 6860890d73

View File

@ -9,6 +9,7 @@ class RedisPubSub {
constructor(config = {}) {
this.config = config;
this.didSendRequestEvent = false;
this.pub = Redis.createClient();
this.sub = Redis.createClient();
this.emitter = new EventEmitter2();
@ -57,7 +58,10 @@ class RedisPubSub {
}
handleSubscribe() {
if (this.didSendRequestEvent) return;
this.publish(this.config.channels.toBBBApps.meeting, REQUEST_EVENT);
this.didSendRequestEvent = true;
}
handleMessage(pattern, channel, message = '') {