fix: Disable close_on_disconnect to keep session alive

E2EE key setup may briefly appear as participant disconnect.
Keep session alive to allow audio to flow once keys are settled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-02-22 06:49:44 +02:00
parent b65d04389b
commit c290332a1e

View File

@@ -290,7 +290,8 @@ class VoiceSession:
agent = Agent(instructions=VOICE_PROMPT) agent = Agent(instructions=VOICE_PROMPT)
io_opts = room_io.RoomOptions( io_opts = room_io.RoomOptions(
participant_identity=remote_identity, participant_identity=remote_identity,
) if remote_identity else room_io.RoomOptions() close_on_disconnect=False,
) if remote_identity else room_io.RoomOptions(close_on_disconnect=False)
await self.session.start( await self.session.start(
agent=agent, agent=agent,
room=self.lk_room, room=self.lk_room,