Explorar o código

fixing crash on shutdown

Rodja Trappe %!s(int64=3) %!d(string=hai) anos
pai
achega
44ec0fe41f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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]