check the client is not none before close

This commit is contained in:
shaun 2016-11-13 14:47:06 +11:00
parent 0cf8f07daf
commit 1a8cbd7f99

View file

@ -346,5 +346,6 @@ class WebSocketClient(threading.Thread):
def stop_client(self): def stop_client(self):
self._stop_websocket = True self._stop_websocket = True
if self._client is not None:
self._client.close() self._client.close()
log.info("Stopping thread") log.info("Stopping thread")