Skip to content

bugfix: #3344 Reconnecting to the same SFU on membership change #3361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 25, 2025

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Jun 24, 2025

Fixes #3344

This a an ugly workaround, the root cause is that we have a problem with react hooks and a re-render is causing effects with non properly working dependencies to be ran again?
This has changed to actually address the root cause: the activeFocus state returned by the useActiveLivekitFocus hook was updating with new objects that had the same values. (so we switched to the same focus)
Now useActiveLivekitFocus behaves as expected, only returning new objects when there is a change.

We've now fixed it at the source by prohibiting state changes in useActiveLivekitFocus itself.
@toger5 toger5 merged commit 9787ac3 into livekit Jun 25, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bug-Fix Release note category. A PR that fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reconnecting to the same SFU on membership change
3 participants