From: Christian Heller Date: Fri, 6 Mar 2015 12:53:28 +0000 (+0100) Subject: Server/py: Optimize polling in read_command(). X-Git-Tag: tce~408 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/coming?a=commitdiff_plain;h=e09a0c1881ced1ca2873c5f39791f6198004b4cd;p=plomrogue Server/py: Optimize polling in read_command(). --- diff --git a/plomrogue-server.py b/plomrogue-server.py index 0597552..c6bdd44 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -269,7 +269,7 @@ def read_command(): Keep building return string until a newline is encountered. Pause between unsuccessful reads, and after too much waiting, run server_test(). """ - wait_on_fail = 1 + wait_on_fail = 0.03333 max_wait = 5 now = time.time() command = ""