ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By htwtsang
#73057 I'm trying to adapt the esphttpd html example to the RTOS SDK and I've come across a problem with the connection status messages cgi. On successful connection it does not send the ip address, it puts the data into the send buffer and flushes but the browser does not receive it.
It seems to get block on select() function in platHttpServerTask. After a while it moves to the recovery function but can't recover the connection and closes the socket, I get an errno 104 when this happen and sometimes 103.
My guess that what is happening is that after it connects to the new network it starts a new connection and the old one is no longer available but this seems strange since the nonos sdk works fine.

Anyone got any ideas on this?
User avatar
By htwtsang
#73546 I found a workaround, which is switching back to softAP mode before restarting again seems to work.
It would seems the socket is still alive but will never be writeable when connected to the new AP and select() function will be stuck.

Well as long as it's working.