Explorar o código

!2 if port used, retry

pcacc hai 6 días
pai
achega
6d7544cf45
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      app_dongri.py

+ 5 - 2
app_dongri.py

@@ -726,5 +726,8 @@ if __name__ == '__main__':
     threading.Thread(target=startup_frpc, daemon=False).start()
     print("FRPC已启动,主程序继续运行...")
     
-    socketio.run(app, host= '0.0.0.0', debug=True, use_reloader=False)#关闭自动重载
-    handle_restart_game()
+    try:
+        socketio.run(app, host= '0.0.0.0', debug=True, use_reloader=False)#关闭自动重载
+    except Exception as e:
+        print(e)
+        handle_restart_game()