Skip to content

Commit c007eef

Browse files
authored
fix(worker): ensure safe iteration over process pool during job joining (livekit#3710)
1 parent 3835678 commit c007eef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

livekit-agents/livekit/agents/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ async def drain(self, timeout: int | None = None) -> None:
541541
await self._update_worker_status()
542542

543543
async def _join_jobs() -> None:
544-
for proc in self._proc_pool.processes:
544+
for proc in list(self._proc_pool.processes):
545545
if proc.running_job:
546546
await proc.join()
547547

0 commit comments

Comments
 (0)