I am using the DigiESP (latest patched version) to compile code for a ConnectME(custom firmware). We have seen a lot of issues connecting to an SSL socket, when there are intermittent internet connection issues. I am trying to solve it in a lot of different ways but the two issues that I see are:
- naSslNgConnect cannot use non blocking sockets
- naSslNgConnect(and possibly sockets on NETOS/ThreadX) are not thread-safe (if I terminate the underlying TCP socket, sometimes the ConnectME will crash)
This is a problem that has been at the core of NETOS since very early on, and I have been trying to solve it in many different ways. The underlying issue is that if your TCP socket gets terminated while you are inside the naSslNgConnect(), there is no guarantee that this method will return back (could possibly block forever).
Please either patch naSslNgConnect() (I assume it’s shared code from openssl) or let me know what can be done!!