fix: ensure buffered events are flushed on signal reconnection - #2043
Conversation
🦋 Changeset detectedLatest commit: 3602f15 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| ParticipantEvent.TrackUnsubscribed, | ||
| (track: RemoteTrack, publication: RemoteTrackPublication) => { | ||
| this.emit(RoomEvent.TrackUnsubscribed, track, publication, participant); | ||
| this.emitWhenConnected(RoomEvent.TrackUnsubscribed, track, publication, participant); |
There was a problem hiding this comment.
this was asymmetric before wrt TrackSubscribed. Now both events are buffered when not connected
There was a problem hiding this comment.
Nice, that makes sense, do we need to use emitWhenConnected for other events as well ?and does emitWhenConnected make sure all the events will be emitted in the right orders ?
There was a problem hiding this comment.
had to revert this, as it was leading to the events getting lost during teardown.
There's still a test in #2044 that ensures correct behaviour here
size-limit report 📦
|
| this.emitBufferedEvents(); | ||
| }) | ||
| .on(EngineEvent.SignalResumed, () => { | ||
| this.bufferedEvents = []; |
There was a problem hiding this comment.
this is the main bug. The buffered events should not have been cleared on SignalResumed.
Instead we're now flushing them
…js into lukas/e2ee-setup-fix
No description provided.