Skip to content

Commit b8a9ba5

Browse files
committed
adopts same method interface as client
1 parent d742b4b commit b8a9ba5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_aws_iot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def _on_unsubscribe_mqtt(
222222
self.on_unsubscribe(self, user_data, topic, pid)
223223

224224
# MiniMQTT Network Control Flow
225-
def loop(self) -> None:
225+
def loop(self, timeout: float = 0) -> None:
226226
"""Starts a synchronous message loop which maintains connection with AWS IoT.
227227
Must be called within the keep_alive timeout specified to init.
228228
This method does not handle network connection/disconnection.
@@ -235,7 +235,7 @@ def loop(self) -> None:
235235
236236
"""
237237
if self.connected_to_aws:
238-
self.client.loop()
238+
self.client.loop(timeout)
239239

240240
@staticmethod
241241
def validate_topic(topic: str) -> None:

0 commit comments

Comments
 (0)