From a9b5a56aad15b9854552c8ce4fe278c751b67c80 Mon Sep 17 00:00:00 2001 From: Markus Zehnder Date: Sun, 15 Feb 2026 12:10:03 +0100 Subject: [PATCH] fix: voice session cleanup Correctly remove the voice session when the voice handler finishes. --- ucapi/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucapi/api.py b/ucapi/api.py index 5e30941..428201d 100644 --- a/ucapi/api.py +++ b/ucapi/api.py @@ -620,7 +620,7 @@ async def _run_voice_handler(self, session: VoiceSession) -> None: session.end(VoiceEndReason.ERROR, ex) finally: # Ensure iterator is unblocked and session is cleaned up - await self._cleanup_voice_session(session.session_id) + await self._cleanup_voice_session(session.key) def _schedule_voice_timeout(self, key: VoiceSessionKey) -> None: """Schedule the timeout task for a voice session.