浏览代码

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]