Skip to content

Commit dde29b5

Browse files
committed
ignore EAGAIN error (occurs when timeout is 0)
1 parent cf39fbc commit dde29b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,9 @@ def _wait_for_msg(self, timeout=0.1):
882882
if error.errno == errno.ETIMEDOUT:
883883
# raised by a socket timeout if 0 bytes were present
884884
return None
885+
if error.errno == errno.EAGAIN:
886+
# there is no data available right now, try again later
887+
return None
885888
raise MMQTTException from error
886889

887890
# Block while we parse the rest of the response

0 commit comments

Comments
 (0)