Skip to content

Commit

Permalink
fix: flush the WS event queue in FIFO order
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela committed Oct 3, 2023
1 parent c82e479 commit 66e3b49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ export class Channel<StreamChatGenerics extends ExtendableGenerics = DefaultGene

_flushWsEventQueue() {
while (this.wsEventQueue.length) {
const event = this.wsEventQueue.pop();
const event = this.wsEventQueue.shift();
if (event) this.getClient().dispatchEvent(event);
}
}
Expand Down

0 comments on commit 66e3b49

Please sign in to comment.