From fa826c2791e19e712defde94c59da20cacfcb216 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 15 Jan 2016 01:26:54 -0600 Subject: [PATCH] Fix websocket not restarting Didn't realise the method and class variable had the same name. --- resources/lib/websocket_client.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/lib/websocket_client.py b/resources/lib/websocket_client.py index df5a7658..da59da83 100644 --- a/resources/lib/websocket_client.py +++ b/resources/lib/websocket_client.py @@ -27,7 +27,7 @@ class WebSocket_Client(threading.Thread): _shared_state = {} client = None - stopClient = False + stopWebsocket = False def __init__(self): @@ -302,8 +302,7 @@ class WebSocket_Client(threading.Thread): while not monitor.abortRequested(): self.client.run_forever() - - if self.stopClient: + if self.stopWebsocket: break if monitor.waitForAbort(5): @@ -314,6 +313,6 @@ class WebSocket_Client(threading.Thread): def stopClient(self): - self.stopClient = True + self.stopWebsocket = True self.client.close() self.logMsg("Stopping thread.") \ No newline at end of file