mirror of https://github.com/morpheus65535/bazarr
Fix for websocket connection using 100% of cpu in some case.
This commit is contained in:
parent
35daaeb6f2
commit
7f9f440f1e
|
@ -1754,9 +1754,11 @@ def handle_websocket():
|
|||
|
||||
while True:
|
||||
try:
|
||||
if len(queueconfig.q4ws) > 0:
|
||||
if queueconfig.q4ws:
|
||||
wsock.send(queueconfig.q4ws.popleft())
|
||||
gevent.sleep(0)
|
||||
gevent.sleep(0.1)
|
||||
else:
|
||||
gevent.sleep(0.5)
|
||||
except WebSocketError:
|
||||
break
|
||||
|
||||
|
|
Loading…
Reference in New Issue