FIX: in some cases we subscribed to an invalid channel
in some very rare cases we would publish and empty payload causing messagebus corruption this broke all navigation
This commit is contained in:
parent
f0bdca87d8
commit
8b62b59b2e
|
@ -80,6 +80,9 @@ export default Ember.Component.extend({
|
||||||
if (this.get('isDestroyed')) { return; }
|
if (this.get('isDestroyed')) { return; }
|
||||||
this.set('presenceUsers', r.users);
|
this.set('presenceUsers', r.users);
|
||||||
this.set('channel', r.messagebus_channel);
|
this.set('channel', r.messagebus_channel);
|
||||||
|
|
||||||
|
if (!r.messagebus_channel) { return; }
|
||||||
|
|
||||||
this.messageBus.subscribe(r.messagebus_channel, message => {
|
this.messageBus.subscribe(r.messagebus_channel, message => {
|
||||||
if (!this.get('isDestroyed')) this.set('presenceUsers', message.users);
|
if (!this.get('isDestroyed')) this.set('presenceUsers', message.users);
|
||||||
this._clearTimer = Ember.run.debounce(this, 'clear', keepAliveDuration + bufferTime);
|
this._clearTimer = Ember.run.debounce(this, 'clear', keepAliveDuration + bufferTime);
|
||||||
|
|
Loading…
Reference in New Issue