Parcourir la source

disconnect air before shutting down

Rodja Trappe il y a 1 an
Parent
commit
ab9d1a3ae0
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      nicegui/nicegui.py

+ 1 - 1
nicegui/nicegui.py

@@ -121,9 +121,9 @@ async def _shutdown() -> None:
     """Handle the shutdown event."""
     if app.native.main_window:
         app.native.main_window.signal_server_shutdown()
+    air.disconnect()
     app.stop()
     run.tear_down()
-    air.disconnect()
 
 
 @app.exception_handler(404)