mirror of
https://github.com/esphome/esphome.git
synced 2026-09-01 02:26:01 +00:00
Update esphome/components/web_server_idf/web_server_idf.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot
parent
402a308540
commit
c5471ebaad
@@ -121,11 +121,10 @@ void AsyncWebServer::begin() {
|
||||
if (this->server_) {
|
||||
this->end();
|
||||
}
|
||||
// Default httpd stack is 4096. Increase to accommodate SerializationBuffer's
|
||||
// Default httpd stack is defined by ESP-IDF. Increase to accommodate SerializationBuffer's
|
||||
// 640-byte stack buffer used by web_server JSON request handlers.
|
||||
constexpr size_t httpd_stack_size = 4096 + 256;
|
||||
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
|
||||
config.stack_size = httpd_stack_size;
|
||||
config.stack_size = config.stack_size + 256;
|
||||
config.server_port = this->port_;
|
||||
config.uri_match_fn = [](const char * /*unused*/, const char * /*unused*/, size_t /*unused*/) { return true; };
|
||||
// Always enable LRU purging to handle socket exhaustion gracefully.
|
||||
|
||||
Reference in New Issue
Block a user