Skip to content

Commit

Permalink
Fix stack dump on closed stream
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-purplefish committed Nov 1, 2024
1 parent 95a90f0 commit a1c2798
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion livekit-agents/livekit/agents/ipc/job_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ async def _async_main(
async def _read_ipc_task():
nonlocal job_task
while True:
msg = await channel.arecv_message(cch, proto.IPC_MESSAGES)
try:
msg = await channel.arecv_message(cch, proto.IPC_MESSAGES)
except duplex_unix.DuplexClosed:
break

with contextlib.suppress(utils.aio.SleepFinished):
no_msg_timeout.reset()

Expand Down

0 comments on commit a1c2798

Please sign in to comment.