소스 검색

#445 add back CancelledError handling

Falko Schindler 2 년 전
부모
커밋
54f2d3d5f1
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      nicegui/background_tasks.py

+ 2 - 0
nicegui/background_tasks.py

@@ -49,5 +49,7 @@ def create_lazy(coroutine: Awaitable[T], *, name: str) -> 'asyncio.Task[T]':
 def _handle_task_result(task: asyncio.Task) -> None:
     try:
         task.result()
+    except asyncio.CancelledError:
+        pass
     except Exception as e:
         globals.handle_exception(e)