From: Christian Heller Date: Sat, 24 Oct 2020 23:17:56 +0000 (+0200) Subject: Minor fixes. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Btodo.comment%7D%7D?a=commitdiff_plain;h=2f73d4246c98d4b25d18d0faa987d9ed165a48ae;p=plomrogue2-experiments Minor fixes. --- diff --git a/new2/plomrogue/io.py b/new2/plomrogue/io.py index 12e7450..d740f8c 100644 --- a/new2/plomrogue/io.py +++ b/new2/plomrogue/io.py @@ -14,7 +14,7 @@ class GameIO(): """Handle commands coming through queue q, run game, send results back.""" while True: try: - command, connection_id = q.get(timeout=1) + command, connection_id = q.get(timeout=0.001) self.handle_input(connection_id, command) except queue.Empty: self.game.run_tick() diff --git a/new2/plomrogue/io_websocket.py b/new2/plomrogue/io_websocket.py index 685ac4f..ea16597 100644 --- a/new2/plomrogue/io_websocket.py +++ b/new2/plomrogue/io_websocket.py @@ -12,6 +12,7 @@ class PlomWebSocket(WebSocket): for connection_id in self.server.clients: if self.server.clients[connection_id] == self: self.server.queue.put((connection_id, self.data)) + break def handleConnected(self): import uuid