Commit 839e5ae1 authored by echel0n's avatar echel0n

Switched to using async sleep when waiting for web socket clients to connect.

parent b7b2ac46
import json
from time import sleep
from tornado import gen
from tornado.websocket import WebSocketHandler
import sickrage
......@@ -63,8 +64,7 @@ class WebSocketMessage(object):
def push(self):
"""Push the message to all connected WebSocket clients."""
while not clients:
for client in clients:
sleep(0.1), self.json())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment