Gemini Live: clean up EndFrame deferral state on disconnect

Cancel the deferral timeout task and clear the pending EndFrame during
disconnect, which could otherwise be left dangling after a
CancelFrame-triggered shutdown.
This commit is contained in:
Paul Kompfner
2026-03-24 14:30:14 -04:00
parent d05eb02b98
commit 063955b7eb

View File

@@ -1459,6 +1459,8 @@ class GeminiLiveLLMService(LLMService):
if self._transcription_timeout_task:
await self.cancel_task(self._transcription_timeout_task)
self._transcription_timeout_task = None
self._cancel_end_frame_deferral_timeout()
self._end_frame_pending_bot_turn_finished = None
if self._session:
await self._session.close()
self._session = None