Fix logical bug with shutdown log/console prompts

This commit is contained in:
Andrew 2022-08-21 13:00:24 -04:00
parent d06db6e028
commit 9d961215a5

View File

@ -617,14 +617,15 @@ class ServerInstance:
while running: while running:
i += 1 i += 1
ttk = int(self.shutdown_timeout - (i * 2)) ttk = int(self.shutdown_timeout - (i * 2))
logstr = ( if i <= self.shutdown_timeout / 2:
f"Server {server_name} is still running " logstr = (
"- waiting 2s to see if it stops" f"Server {server_name} is still running "
f"({ttk} " "- waiting 2s to see if it stops"
f"seconds until force close)" f"({ttk} "
) f"seconds until force close)"
logger.info(logstr) )
Console.info(logstr) logger.info(logstr)
Console.info(logstr)
running = self.check_running() running = self.check_running()
time.sleep(2) time.sleep(2)