소스 검색

fixing crash on shutdown

Rodja Trappe 3 년 전
부모
커밋
44ec0fe41f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      nicegui/nicegui.py

+ 1 - 1
nicegui/nicegui.py

@@ -23,7 +23,7 @@ def startup():
 
 @jp.app.on_event('shutdown')
 def shutdown():
-    [create_task(t) for t in Ui.shutdown_tasks if isinstance(t, Awaitable)]
+    [create_task(t, name='shutdown task') for t in Ui.shutdown_tasks if isinstance(t, Awaitable)]
     [t() for t in Ui.shutdown_tasks if isinstance(t, Callable)]
     [t.cancel() for t in globals.tasks]