Remove unused variable, more clear comment on state object

This commit is contained in:
shortcutme 2017-12-02 15:35:32 +01:00
parent 3de182a4ed
commit 1208294747
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -31,7 +31,7 @@ class UiWebsocket(object):
self.next_message_id = 1
self.waiting_cb = {} # Waiting for callback. Key: message_id, Value: function pointer
self.channels = [] # Channels joined to
self.state = {"sending": False} # Currently sending to client
self.state = {"sending": False} # Shared state of websocket connection
self.send_queue = [] # Messages to send to client
self.admin_commands = (
"sitePause", "siteResume", "siteDelete", "siteList", "siteSetLimit",
@ -195,7 +195,6 @@ class UiWebsocket(object):
return # Already sending
try:
while self.send_queue:
s = time.time()
self.state["sending"] = True
message = self.send_queue.pop(0)
self.ws.send(json.dumps(message))