Skip to content

Commit 65afbd5

Browse files
author
brentru
committed
addressing #58
1 parent 76ab54a commit 65afbd5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -870,9 +870,12 @@ def _wait_for_msg(self, timeout=0.1):
870870
self._sock.settimeout(1)
871871
try:
872872
self._sock.recv_into(res, 1)
873-
print("Resp: ", res) # TODO BR: Remove debugging
874-
except self._socket_pool.timeout:
875-
return None
873+
except OSError as error:
874+
if error.errno == errno.ETIMEDOUT:
875+
# raised by a socketpool
876+
return None
877+
else:
878+
raise MMQTTException(error)
876879

877880
# Block while we parse the rest of the response
878881
self._sock.settimeout(None)

0 commit comments

Comments
 (0)