-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
umqtt.simple's check_msg triggers OSError -1 with TLS servers #5451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Which board? |
I reproduced this issue on my Mac (MicroPython 1.11) and on my LoLin NodeMCU v3 board from wemos.cc (MicroPython 1.12). |
TLS on nonblocking sockets is a known issue, mentioned in my comment here. My experience is that TLS on nonblocking sockets works on Pyboard D but not on ESPx. |
I thought |
It's implemented on ESP32. |
i was just about to create a pull request to update axtls, for this, when i found that its already been fixed in |
Already fixed, according to above comments. |
Please consider this code:
It systematically gives the same output (and I can reproduce it with another broker e.g. AWS IoT)
What's strange is that if I use port 1883 and ssl=False (i.e. no encryption), the same code works.
I reproduced this issue on my Mac (MicroPython 1.11) and on my ESP8266 board (MicroPython 1.12).
Looping over
mqtt.wait_msg()
works like a charm, so I suspect switching back and forth a TLS socket from blocking to non-blocking generates such error.The text was updated successfully, but these errors were encountered: