From 617376a54be80ebd597c2c192743646945a8ed43 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Sat, 19 Mar 2022 17:46:01 +0000 Subject: [PATCH] Shutdown webserver cleanly and let server.py restart it. --- web_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_server.py b/web_server.py index 48ba3c2..7e8af5e 100644 --- a/web_server.py +++ b/web_server.py @@ -14,6 +14,7 @@ from queue import Empty from time import sleep import json import os +import sys from helpers.os_environment import ( isLinux, @@ -557,4 +558,4 @@ def WebServer(player_to: List[Queue], player_from: Queue, state: StateManager): ) except Exception as e: logger.log.exception(e) - sleep(1) + sys.exit(1)