Skip to content

Commit f871143

Browse files
authored
Merge pull request #218 from justmobilize/pystack-and-other-errors
pystack and other errors
2 parents 9c905f7 + bbf6850 commit f871143

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
@@ -435,7 +435,10 @@ def connect(
435435
self._reset_reconnect_backoff()
436436
return ret
437437
except (MemoryError, OSError, RuntimeError) as e:
438+
if isinstance(e, RuntimeError) and e.args == ("pystack exhausted",):
439+
raise
438440
self.logger.warning(f"Socket error when connecting: {e}")
441+
last_exception = e
439442
backoff = False
440443
except MMQTTException as e:
441444
self._close_socket()

0 commit comments

Comments
 (0)