Im using a webserver on my ESP32 which provides functions I can access from the web page via HTTP methods.
On one page I poll values from the ESP32 using JavaScript code like this:
Code: Select all
var xhr = new XMLHttpRequest();
xhr.open("POST", '/server/readADC', true);
xhr.onreadystatechange = function()
{
if (this.readyState === 4 && this.status === 200) {
// Visualize data on the website
}
}
After some time I get this error on the ESP32 side.
W (582011) httpd: httpd_accept_conn: error in accept (23)
W (582011) httpd: httpd_server: error accepting new connection
W (582021) httpd: httpd_accept_conn: error in accept (23)
W (582021) httpd: httpd_server: error accepting new connection
W (583011) httpd: httpd_accept_conn: error in accept (23)
Ive configured the http server with HTTPD_DEFAULT_CONFIG() value.
How am I able to continuously fetch data from the http server?
I'll appreciate any help. Thanks for the support.