adafruit / Adafruit_CircuitPython_MiniMQTT

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

consider setting default non zero value for timeout in loop() #142

Open vladak opened 1 year ago

vladak commented 1 year ago

Looks like the timeout=0 in loop() caused some unexpected behavior https://forums.adafruit.com/viewtopic.php?p=954996#p954996. Maybe it should be considered setting this to non-zero default ?

tekktrik commented 1 year ago

It looks like in the sockets that timeout=0 is blocking, which seems different than how CPython handles it. It may be worth changing that to keep compatibility, I'll try to remember to bring it up at the next CircuitPython weekly meeting.

tekktrik commented 1 year ago

Marking as a bug for now because of the above, and at the very least it doesn't do what the docstring says (0 should be non-blocking according to that).