diff options
Diffstat (limited to 'game/python-extra/ws4py')
-rw-r--r-- | game/python-extra/ws4py/websocket.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/game/python-extra/ws4py/websocket.py b/game/python-extra/ws4py/websocket.py index f7e9e3a..9bca3a0 100644 --- a/game/python-extra/ws4py/websocket.py +++ b/game/python-extra/ws4py/websocket.py @@ -27,7 +27,7 @@ logger = logging.getLogger('ws4py') __all__ = ['WebSocket', 'EchoWebSocket', 'Heartbeat'] class Heartbeat(threading.Thread): - def __init__(self, websocket, frequency=2.0): + def __init__(self, websocket, frequency=5.0): """ Runs at a periodic interval specified by `frequency` by sending an unsolicitated pong @@ -603,6 +603,7 @@ class WebSocket(object): while not self.terminated: if not self.once(): break + time.sleep(0.05) finally: self.terminate() |