Add CallbackAPIversion for MQTT export

Due to the recent update of paho-mqtt to V2.0.0 which requires API versioning, addition of callback_api_version in paho.Client
pull/2700/head
Github GPG acces 2024-03-15 13:12:04 +01:00
parent c591461fde
commit 2e6bcc0758
No known key found for this signature in database
GPG Key ID: 384AAACE61391474
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class Export(GlancesExport):
if not self.export_enable:
return None
try:
client = paho.Client(client_id='glances_' + self.hostname, clean_session=False)
client = paho.Client(callback_api_version=2, client_id='glances_' + self.hostname, clean_session=False)
client.username_pw_set(username=self.user, password=self.password)
if self.tls:
client.tls_set(certifi.where())