Update websocket-client to 1.3.1

This commit is contained in:
alfrix 2022-02-28 14:32:35 -03:00
parent c77bdfe617
commit 320b7a8836
2 changed files with 6 additions and 2 deletions

View File

@ -41,6 +41,7 @@ class KlippyWebsocket(threading.Thread):
self._callback = callback self._callback = callback
self.klippy = MoonrakerApi(self) self.klippy = MoonrakerApi(self)
self.closing = False self.closing = False
self.ws = None
self._url = "%s:%s" % (host, port) self._url = "%s:%s" % (host, port)
@ -87,6 +88,8 @@ class KlippyWebsocket(threading.Thread):
def close(self): def close(self):
self.closing = True self.closing = True
if self.ws is not None:
self.ws.close()
def is_connected(self): def is_connected(self):
return self.connected return self.connected
@ -155,7 +158,8 @@ class KlippyWebsocket(threading.Thread):
if self.closing is True: if self.closing is True:
logging.debug("Closing websocket") logging.debug("Closing websocket")
self.ws.close() self.ws.keep_running = False
self.close()
self.closing = False self.closing = False
return return

View File

@ -3,6 +3,6 @@ jinja2==3.0.3
matplotlib==3.5.0 matplotlib==3.5.0
netifaces==0.11.0 netifaces==0.11.0
requests==2.27.1 requests==2.27.1
websocket-client==1.2.3 websocket-client==1.3.1
pycairo==1.20.1 pycairo==1.20.1
PyGObject==3.42.0 PyGObject==3.42.0