mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
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
1 changed files with 3 additions and 0 deletions
|
@ -80,6 +80,9 @@ export default Ember.Component.extend({
|
|||
if (this.get('isDestroyed')) { return; }
|
||||
this.set('presenceUsers', r.users);
|
||||
this.set('channel', r.messagebus_channel);
|
||||
|
||||
if (!r.messagebus_channel) { return; }
|
||||
|
||||
this.messageBus.subscribe(r.messagebus_channel, message => {
|
||||
if (!this.get('isDestroyed')) this.set('presenceUsers', message.users);
|
||||
this._clearTimer = Ember.run.debounce(this, 'clear', keepAliveDuration + bufferTime);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue