Skip to content

Commit 498b078

Browse files
authored
fix: voice session cleanup (#48)
Correctly remove the voice session when the voice handler finishes.
1 parent 26dadcd commit 498b078

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ucapi/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ async def _run_voice_handler(self, session: VoiceSession) -> None:
622622
session.end(VoiceEndReason.ERROR, ex)
623623
finally:
624624
# Ensure iterator is unblocked and session is cleaned up
625-
await self._cleanup_voice_session(session.session_id)
625+
await self._cleanup_voice_session(session.key)
626626

627627
def _schedule_voice_timeout(self, key: VoiceSessionKey) -> None:
628628
"""Schedule the timeout task for a voice session.

0 commit comments

Comments
 (0)