From 97a21f4d457e9c895553c0d59d1b11a34fabe8d1 Mon Sep 17 00:00:00 2001 From: Frederic Date: Tue, 27 Dec 2016 15:34:37 +0100 Subject: [PATCH] terminate when balance server is not reachable --- gamemenu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gamemenu.py b/gamemenu.py index a46aaa6..7285e66 100755 --- a/gamemenu.py +++ b/gamemenu.py @@ -200,6 +200,7 @@ class BalanceInput(AbstractInput, threading.Thread): self.evt = None self.lastevt = None self.player_present = False + self.running = False threading.Thread.__init__(self, daemon=True) self.start() @@ -272,7 +273,8 @@ class BalanceInput(AbstractInput, threading.Thread): def get_event(self): evt = self.evt - self.evt = None + if self.running: + self.evt = None return evt def start_game(game, players):