Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def reconnect(self, resub_topics: bool = True) -> int:

return ret

def loop(self, timeout: float = 0) -> Optional[list[int]]:
def loop(self, timeout: float = 1.0) -> Optional[list[int]]:
"""Non-blocking message loop. Use this method to check for incoming messages.
Returns list of packet types of any messages received or None.

Expand All @@ -930,8 +930,8 @@ def loop(self, timeout: float = 0) -> Optional[list[int]]:
"""
if timeout < self._socket_timeout:
raise MMQTTException(
f"loop timeout ({timeout}) must be bigger "
+ f"than socket timeout ({self._socket_timeout}))"
f"loop timeout ({timeout}) must be >= "
+ f"socket timeout ({self._socket_timeout}))"
)

self._connected()
Expand Down