forked from platypush/platypush
mqtt CallbackAPIVersion fix for paho.mqtt >= 2.0.0
fix to work with paho.mqtt >= 2.0.0
This commit is contained in:
parent
dba0acb82e
commit
584f226b62
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class MqttClient(mqtt.Client, threading.Thread):
|
|||
**kwargs,
|
||||
):
|
||||
self.client_id = client_id or str(Config.get('device_id'))
|
||||
mqtt.Client.__init__(self, *args, client_id=self.client_id, **kwargs)
|
||||
mqtt.Client.__init__(self, mqtt.CallbackAPIVersion.VERSION1, *args, client_id=self.client_id, **kwargs)
|
||||
threading.Thread.__init__(self, name=f'MQTTClient:{self.client_id}')
|
||||
|
||||
self.logger = logging.getLogger(self.__class__.__name__)
|
||||
|
|
Loading…
Reference in a new issue