Page 1 of 1

TCP client lwip_connect() takes long time

Posted: Tue Feb 24, 2026 8:27 pm
by lemury
Hello, New forum user here.

I have an ESP-IDF based multi-client ESP32 TCP socket server connected to my local network via my wifi router.
Several ESP32 devices wake up from deep sleep, connect to wifi, connect to this TCP server and send their sensor data to be stored.

After a few hours these wifi clients start to take a long time to reconnect to the TCP server.
That is; they connect to wifi fast, but take a long time to get out of lwip_connect();

It has something to do with wifi because ethernet connected devices always connect immediately to the server.
Also, once a wifi client has finaly made a TCP connection, closing and reopening it without closing wifi is also immediately.
I use hard coded server IP addresses in the clients so it's not an DHCP issue either.

Restarting the server fixes the problem.
Any suggestion are welcome.
Thank you.

Re: TCP client lwip_connect() takes long time

Posted: Thu Feb 26, 2026 8:36 pm
by nopnop2002
Restarting the server fixes the problem.
I think this means there is some problem on the TCP server side.