mirror of
https://github.com/suitenumerique/meet.git
synced 2026-09-04 06:35:38 +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
|
- ⬆️(backend) bump django-lasuite to v0.0.26
|
||||||
- 🩹(frontend) use a more standard (quality) rating scale
|
- 🩹(frontend) use a more standard (quality) rating scale
|
||||||
- 🩹(frontend) fix access control for screen recording feature flag
|
- 🩹(frontend) fix access control for screen recording feature flag
|
||||||
|
- 🩹(frontend) fix reconnect loop caused by connectionObserverStore updates
|
||||||
|
|
||||||
## [1.14.0] - 2026-04-16
|
## [1.14.0] - 2026-04-16
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ import { useConfig } from '@/api/useConfig'
|
|||||||
import { isFireFox } from '@/utils/livekit'
|
import { isFireFox } from '@/utils/livekit'
|
||||||
import { useIsMobile } from '@/utils/useIsMobile'
|
import { useIsMobile } from '@/utils/useIsMobile'
|
||||||
import { navigateTo } from '@/navigation/navigateTo'
|
import { navigateTo } from '@/navigation/navigateTo'
|
||||||
import { useSnapshot } from 'valtio'
|
|
||||||
import { connectionObserverStore } from '@/stores/connectionObserver'
|
import { connectionObserverStore } from '@/stores/connectionObserver'
|
||||||
|
|
||||||
export const Conference = ({
|
export const Conference = ({
|
||||||
@@ -46,8 +45,6 @@ export const Conference = ({
|
|||||||
const posthog = usePostHog()
|
const posthog = usePostHog()
|
||||||
const { data: apiConfig } = useConfig()
|
const { data: apiConfig } = useConfig()
|
||||||
|
|
||||||
const connectionObserverSnap = useSnapshot(connectionObserverStore)
|
|
||||||
|
|
||||||
const { userChoices: userConfig } = usePersistentUserChoices() as {
|
const { userChoices: userConfig } = usePersistentUserChoices() as {
|
||||||
userChoices: LocalUserChoices
|
userChoices: LocalUserChoices
|
||||||
}
|
}
|
||||||
@@ -234,16 +231,16 @@ export const Conference = ({
|
|||||||
onDisconnected={(e) => {
|
onDisconnected={(e) => {
|
||||||
const metadata = {
|
const metadata = {
|
||||||
room_id: roomId,
|
room_id: roomId,
|
||||||
pc_publisher: connectionObserverSnap.publisher && {
|
pc_publisher: connectionObserverStore.publisher && {
|
||||||
...connectionObserverSnap.publisher,
|
...connectionObserverStore.publisher,
|
||||||
},
|
},
|
||||||
pc_subscriber: connectionObserverSnap.subscriber && {
|
pc_subscriber: connectionObserverStore.subscriber && {
|
||||||
...connectionObserverSnap.subscriber,
|
...connectionObserverStore.subscriber,
|
||||||
},
|
},
|
||||||
pc_publisher_changes_count:
|
pc_publisher_changes_count:
|
||||||
connectionObserverSnap.publisherChangesCount,
|
connectionObserverStore.publisherChangesCount,
|
||||||
pc_subscriber_changes_count:
|
pc_subscriber_changes_count:
|
||||||
connectionObserverSnap.subscriberChangesCount,
|
connectionObserverStore.subscriberChangesCount,
|
||||||
}
|
}
|
||||||
|
|
||||||
connectionObserverStore.publisher = null
|
connectionObserverStore.publisher = null
|
||||||
|
|||||||
Reference in New Issue
Block a user