mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-26 11:58:53 +00:00
🩹(frontend) fix reconnect loop caused by connectionObserverStore updates
Updating connectionObserverSnapshot triggered page re-renders, causing participants to reconnect due to a race condition. Read directly from the underlying store instead of using the snapshot to avoid unnecessary re-renders.
This commit is contained in:
committed by
aleb_the_flash
parent
ac2eddc10f
commit
dd3d47afe6
@@ -23,6 +23,7 @@ and this project adheres to
|
||||
- ⬆️(backend) bump django-lasuite to v0.0.26
|
||||
- 🩹(frontend) use a more standard (quality) rating scale
|
||||
- 🩹(frontend) fix access control for screen recording feature flag
|
||||
- 🩹(frontend) fix reconnect loop caused by connectionObserverStore updates
|
||||
|
||||
## [1.14.0] - 2026-04-16
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ import { useConfig } from '@/api/useConfig'
|
||||
import { isFireFox } from '@/utils/livekit'
|
||||
import { useIsMobile } from '@/utils/useIsMobile'
|
||||
import { navigateTo } from '@/navigation/navigateTo'
|
||||
import { useSnapshot } from 'valtio'
|
||||
import { connectionObserverStore } from '@/stores/connectionObserver'
|
||||
|
||||
export const Conference = ({
|
||||
@@ -46,8 +45,6 @@ export const Conference = ({
|
||||
const posthog = usePostHog()
|
||||
const { data: apiConfig } = useConfig()
|
||||
|
||||
const connectionObserverSnap = useSnapshot(connectionObserverStore)
|
||||
|
||||
const { userChoices: userConfig } = usePersistentUserChoices() as {
|
||||
userChoices: LocalUserChoices
|
||||
}
|
||||
@@ -234,16 +231,16 @@ export const Conference = ({
|
||||
onDisconnected={(e) => {
|
||||
const metadata = {
|
||||
room_id: roomId,
|
||||
pc_publisher: connectionObserverSnap.publisher && {
|
||||
...connectionObserverSnap.publisher,
|
||||
pc_publisher: connectionObserverStore.publisher && {
|
||||
...connectionObserverStore.publisher,
|
||||
},
|
||||
pc_subscriber: connectionObserverSnap.subscriber && {
|
||||
...connectionObserverSnap.subscriber,
|
||||
pc_subscriber: connectionObserverStore.subscriber && {
|
||||
...connectionObserverStore.subscriber,
|
||||
},
|
||||
pc_publisher_changes_count:
|
||||
connectionObserverSnap.publisherChangesCount,
|
||||
connectionObserverStore.publisherChangesCount,
|
||||
pc_subscriber_changes_count:
|
||||
connectionObserverSnap.subscriberChangesCount,
|
||||
connectionObserverStore.subscriberChangesCount,
|
||||
}
|
||||
|
||||
connectionObserverStore.publisher = null
|
||||
|
||||
Reference in New Issue
Block a user