Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions moshi/moshi/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ async def opus_loop():
return
await asyncio.sleep(0.001)
pcm = opus_reader.read_pcm()
if pcm is None:
# client opus stream ended (disconnect mid-stream);
# exit cleanly so the session lock is released.
return
if pcm.shape[-1] == 0:
continue
if all_pcm_data is None:
Expand Down