adafruit / Adafruit_CircuitPython_MiniMQTT

MQTT Client Library for CircuitPython
Other
72 stars 50 forks source link

Simplify socket exceptions #203

Closed justmobilize closed 4 months ago

justmobilize commented 4 months ago

The purpose of this PR is to simplify socket exceptions, so the move to ConnectionManager is smother.

Currently when getting a socket, an OSError is not treated as a TemporaryError and thus the retry is delayed. As far as I can tell, there is no benefit to delaying the next try here and it will cause ConnectionManager to be overly complex.

This treats OSError like any other error, and thus no custom handling will be needed in ConnectionManager.

If there is something I am missing, please let me know.

tannewt commented 4 months ago

Looks fine to me. Will leave it up to Brent though since he uses this code afaik.