Skip to content

Commit f2cb3bb

Browse files
authored
Merge pull request #123 from rtwfroody/eagain2
_wait_for_msg(): accept EAGAIN in addition to ETIMEDOUT
2 parents c35316a + e959026 commit f2cb3bb

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
@@ -870,7 +870,7 @@ def _wait_for_msg(self, timeout=0.1):
870870
try:
871871
res = self._sock_exact_recv(1)
872872
except OSError as error:
873-
if error.errno == errno.ETIMEDOUT:
873+
if error.errno in (errno.ETIMEDOUT, errno.EAGAIN):
874874
# raised by a socket timeout if 0 bytes were present
875875
return None
876876
raise MMQTTException from error

0 commit comments

Comments
 (0)