WiFi on loopback: no update for connected()
Posted: Sat Oct 24, 2020 9:14 am
I got a simple WiFiServer/WiFiClient pair running in two tasks on an ESP32 DevKitC V4. For testing reasons I am using the loopback interface, the client will connect to 127.0.0.1.
As long as the client stays connected, everything runs fine. But as soon as the client disconnects (by calling stop()), the server does not notice. A call to connected() will always signal an existing connection regardless.
But if I do a second connect from a remote client, out of a sudden the server also notices the loopback client has disconnected.
What am I missing here to get the connected() report the right information on pure loopback also?
As long as the client stays connected, everything runs fine. But as soon as the client disconnects (by calling stop()), the server does not notice. A call to connected() will always signal an existing connection regardless.
But if I do a second connect from a remote client, out of a sudden the server also notices the loopback client has disconnected.
What am I missing here to get the connected() report the right information on pure loopback also?