Skip to content

Commit 20cd8e4

Browse files
puuupfalcon
authored andcommitted
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.
1 parent 6190cec commit 20cd8e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

umqtt.robust/umqtt/robust.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ def reconnect(self):
2626
i += 1
2727
self.delay(i)
2828

29-
def publish(self, topic, msg, qos=0, retain=False):
29+
def publish(self, topic, msg, retain=False, qos=0):
3030
while 1:
3131
try:
32-
return super().publish(topic, msg, qos, retain)
32+
return super().publish(topic, msg, retain, qos)
3333
except OSError as e:
3434
self.log(False, e)
3535
self.reconnect()

0 commit comments

Comments
 (0)