mirror of
https://github.com/markqvist/Sideband.git
synced 2025-11-30 20:27:03 -05:00
Fixed missing none check
This commit is contained in:
parent
9a11bfded2
commit
a2c2de49fe
1 changed files with 3 additions and 2 deletions
|
|
@ -81,8 +81,9 @@ class MQTT():
|
|||
|
||||
def disconnect(self):
|
||||
RNS.log("Disconnecting from MQTT server", RNS.LOG_EXTREME) # TODO: Remove debug
|
||||
self.client.disconnect()
|
||||
self.client.loop_stop()
|
||||
if self.client:
|
||||
self.client.disconnect()
|
||||
self.client.loop_stop()
|
||||
self.is_connected = False
|
||||
|
||||
def post_message(self, topic, data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue