def disconnect(self):
    self.connected = False
    self.client.loop_stop()
    self.client.disconnect()
def disconnect(self):
    self.connected = False
    self.client.loop_stop()
    self.client.disconnect()