kopia lustrzana https://github.com/micropython/micropython-lib
umqtt.robust: publish(): Adapt signature to umqtt.simple.
umqtt.simple uses publish(self, topic, msg, retain=False, qos=0), so make umqtt.robust use the same. Otherwise, retain and qos will not work.pull/86/head
rodzic
6190cec14a
commit
20cd8e4651
|
@ -26,10 +26,10 @@ class MQTTClient(simple.MQTTClient):
|
||||||
i += 1
|
i += 1
|
||||||
self.delay(i)
|
self.delay(i)
|
||||||
|
|
||||||
def publish(self, topic, msg, qos=0, retain=False):
|
def publish(self, topic, msg, retain=False, qos=0):
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
return super().publish(topic, msg, qos, retain)
|
return super().publish(topic, msg, retain, qos)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
self.log(False, e)
|
self.log(False, e)
|
||||||
self.reconnect()
|
self.reconnect()
|
||||||
|
|
Ładowanie…
Reference in New Issue