Skip to content

Commit e713752

Browse files
authored
Teardown on unhandled exceptions by work (#1406)
1 parent fce40f0 commit e713752

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

proxy/core/work/threadless.py

+2
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ async def _run_once(self) -> bool:
370370
work_id = task._work_id # type: ignore
371371
try:
372372
teardown = task.result()
373+
except Exception:
374+
teardown = True
373375
finally:
374376
if teardown:
375377
self._cleanup(work_id)

0 commit comments

Comments
 (0)