The condition in file: c8yMQTT.py, line 115) is not correct:
Current code:
count=0
while self.connected==False and count < 50:
time.sleep(.2)
count+=1
if self.connected!=False:
self.logger.error('Could not connect to the MQTT Broker.')
return False
else:
self.client.loop_start()
for t in topics:
self.client.subscribe(t, 2)
Suggested change:
count=0
self.client.loop_start()
while self.connected==False and count < 50:
time.sleep(.2)
count+=1
if self.connected==False:
self.logger.error('Could not connect to the MQTT Broker.')
self.client.loop_stop()
return False
else:
for t in topics:
self.client.subscribe(t, 2)
The condition in file: c8yMQTT.py, line 115) is not correct:
Current code:
Suggested change: