Skip to content

Commit 0297a4d

Browse files
committed
check is_connected in loop()
1 parent 89637ed commit 0297a4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ def loop(self, timeout: float = 0) -> Optional[list[int]]:
986986
:param float timeout: return after this timeout, in seconds.
987987
988988
"""
989-
989+
self._connected()
990990
self.logger.debug(f"waiting for messages for {timeout} seconds")
991991
if self._timestamp == 0:
992992
self._timestamp = time.monotonic()

0 commit comments

Comments
 (0)