Skip to content

Commit

Permalink
Merge pull request #218 from justmobilize/pystack-and-other-errors
Browse files Browse the repository at this point in the history
pystack and other errors
  • Loading branch information
dhalbert authored May 22, 2024
2 parents 9c905f7 + bbf6850 commit f871143
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,10 @@ def connect(
self._reset_reconnect_backoff()
return ret
except (MemoryError, OSError, RuntimeError) as e:
if isinstance(e, RuntimeError) and e.args == ("pystack exhausted",):
raise
self.logger.warning(f"Socket error when connecting: {e}")
last_exception = e
backoff = False
except MMQTTException as e:
self._close_socket()
Expand Down

0 comments on commit f871143

Please sign in to comment.