Open vladak opened 1 year ago
@vladak This seems resolved via https://github.com/adafruit/circuitpython/pull/7632 and https://github.com/adafruit/circuitpython/pull/7779. Are you able to test on CircuitPython 8.1.0 Beta 1?
Actually, looking at the stack trace, this is a problem that seems to happen only with CPython.
@vladak
1) Could you clarify - are you expecting messages to be received? The REPL shows you exit from the loop() ("out from loop?").
2) The issue title lists "CPython". Are you interested in re-testing that? If not, it's ok, I will.
@vladak btw - Thank you for your work, PRs, and issues reported on this library.
I've had different priorities since writing it (mostly working on Adafruit WipperSnapper). I am getting back to resolving issues with MiniMQTT and enhancing it starting next week.
- Could you clarify - are you expecting messages to be received? The REPL shows you exit from the loop() ("out from loop?").
The "Out from loop()" message simply means that the mqtt_client.loop(timeout=3)
returned, so next iteration of the cycle will be done. See the code above.
For this case, I am not expecting any messages to be received withing the loop()
(besides PINGRESP
behind the scenes).
- The issue title lists "CPython". Are you interested in re-testing that? If not, it's ok, I will.
I've just tried that, still hitting the same issue.
btw - Thank you for your work, PRs, and issues reported on this library.
You are certainly welcome, I had fun doing that.
I've had different priorities since writing it (mostly working on Adafruit WipperSnapper). I am getting back to resolving issues with MiniMQTT and enhancing it starting next week.
Cool !
When connected via TLS, i.e. the socket is wrapped using the
ssl_context
and if there is nothing to be read in the loop, it results in:In such case,
_wait_for_msg()
should returnNone
, however the ssl exception fires through: https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/blob/342b8c99b2c8f10b605cc8311bf5f394f4d18e92/adafruit_minimqtt/adafruit_minimqtt.py#L967-L972Note that the line numbers do not match because I am using minimqtt code for one of my PRs, however that should not matter.
Trouble is that the
ssl.SSLWantReadError
does not seem to be reachable from the ssl context passed toMQTT()
init function. The exception class is based onOSError
, however catching that would be too generic, I think.