TCPSocket::connect blocks forever

We’re again trying to use TCPSocket to perform some simple IoT data uploads. In the past that class has been broken for us as it has either caused crashes or just stopped receiving data after a while. But in
5.15.9 it seems stabler for some reason so we’re giving it another try.

However, when doing a TCPSocket::connect(const SocketAddress &) to an address that doesn’t currently exist, the call blocks forever. After 20 seconds our watchdog kills the app. We’ve tried to set_blocking(false) and set_timeout(0) but neither has any effect. Only having a blocking connect() seems a bit strange.

Is TCPSocket still a bit broken or is there simply no timeout or is the timeout just immensely long?

When using a correct IP address it all seems to work as it should, although we haven’t yet done any longer tests than a few hours.

If you use the debugger, can you see where in the TCP code it’s waiting?

Unfortunately no debugger available on these boards. So developing with serial logging only.