Moderator: Sprite_tm
Just so I can test it: What browser are you using?
Thanks.
David
Ovaltineo wrote:Good news! I can now get it working at any place in my house. I added "Connection: close" header in all responses and I don't get reconnect errors anymore, especially in the home page where multiple resources (css and jpgs) are present in the page.
I examined the esphttpd code and noticed that the socket is being closed after a http response is sent. This works via AP mode because there is minimal propagation delay and the the browser client sees the socket has been closed before it has a chance to make another request on the same socket. In STATION mode, there is more propagation delay and the client has already made another request on the socket before it sees the close on the socket. This causes the ESP to reconnect the socket (doesn't really work) and causes havoc. By adding "Connection: close" to the response header, the client browser is forced to close the socket and open a new one for each request.
So, I was right in my original post, esphttpd is closing the socket too early.