Fix for websocket connection using 100% of cpu in some case.

pull/292/head
Louis Vézina 6 years ago
parent 35daaeb6f2
commit 7f9f440f1e

@ -1754,9 +1754,11 @@ def handle_websocket():
while True: while True:
try: try:
if len(queueconfig.q4ws) > 0: if queueconfig.q4ws:
wsock.send(queueconfig.q4ws.popleft()) wsock.send(queueconfig.q4ws.popleft())
gevent.sleep(0) gevent.sleep(0.1)
else:
gevent.sleep(0.5)
except WebSocketError: except WebSocketError:
break break

Loading…
Cancel
Save