Explorar el Código

!2 cleanup resources when restart game

pcacc hace 1 mes
padre
commit
743053f9f1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app_dongri.py

+ 1 - 1
app_dongri.py

@@ -174,7 +174,7 @@ def handle_restart_game():
         sys.argv.remove('--reset')
     print("当前参数:", sys.argv)
     subprocess.Popen([python, *sys.argv, '--reset'])
-    os._exit(0)
+    sys.exit(0)
 
 @app.route('/restart_game', methods=['POST'])
 def http_restart_game():