fix: prevent stale voice sidebar after multi-session identity collision
When a second browser joins voice, LiveKit disconnects the first browser via identity collision. The first browser's leaveVoice() was optimistically removing the user from voiceUsers, but the user is still in voice from the other session. Add handleForceDisconnect() that clears local connection state without touching voiceUsers, keeping the sidebar accurate. Also fix deploy.sh to clean up stale renamed containers from failed recreates.
This commit is contained in:
@@ -491,7 +491,7 @@ export function useLiveKit() {
|
||||
// → clear voice intent so AppLayout doesn't auto-retry into an infinite loop.
|
||||
// Client-initiated disconnects already clear this via leaveVoice() / VoiceControlBar.
|
||||
if (reason !== undefined && reason !== DisconnectReason.CLIENT_INITIATED) {
|
||||
useVoiceStore.getState().leaveVoice();
|
||||
useVoiceStore.getState().handleForceDisconnect();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user