Skip to content

Commit 5dad29e

Browse files
puuudpgeorge
authored andcommitted
umqtt.robust: Let reconnect() call the connect() method of parent class.
This allow overriding of the `connect()` method by a subclass, eg: from umqtt import robust class MQTTClient(robust.MQTTClient): def connect(self, clean_session=True): res = super().connect(clean_session) self.after_connect() return res def after_connect(): # use for mqtt subscribe return
1 parent 1852c01 commit 5dad29e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

micropython/umqtt.robust/umqtt/robust.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def reconnect(self):
2020
i = 0
2121
while 1:
2222
try:
23-
return super().connect(False)
23+
return self.connect(False)
2424
except OSError as e:
2525
self.log(True, e)
2626
i += 1

0 commit comments

Comments
 (0)