From 063955b7eb1fe2903489d2d8f7083b48df548eee Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Tue, 24 Mar 2026 14:30:14 -0400 Subject: [PATCH] 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. --- src/pipecat/services/google/gemini_live/llm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pipecat/services/google/gemini_live/llm.py b/src/pipecat/services/google/gemini_live/llm.py index 4a4ff43f4..33aaacaa6 100644 --- a/src/pipecat/services/google/gemini_live/llm.py +++ b/src/pipecat/services/google/gemini_live/llm.py @@ -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