Skip to content

Commit

Permalink
Merge pull request #123 from rtwfroody/eagain2
Browse files Browse the repository at this point in the history
_wait_for_msg(): accept EAGAIN in addition to ETIMEDOUT
  • Loading branch information
brentru committed Sep 19, 2022
2 parents c35316a + e959026 commit f2cb3bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def _wait_for_msg(self, timeout=0.1):
try:
res = self._sock_exact_recv(1)
except OSError as error:
if error.errno == errno.ETIMEDOUT:
if error.errno in (errno.ETIMEDOUT, errno.EAGAIN):
# raised by a socket timeout if 0 bytes were present
return None
raise MMQTTException from error
Expand Down

0 comments on commit f2cb3bb

Please sign in to comment.