upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-19 22:58:01 +0530
committerYour Name <you@example.com>2026-05-19 22:58:01 +0530
commit144b48f53110d4c186f5deafd1d1365e0a140331 (patch)
tree93e8f65285bb67e2fa09b45008926afcd020601e /main
parent918432128df5797045dc27407d30851a60c1a69f (diff)
fix: use default httpd socket settings to prevent socket exhaustionfeature/tollgate-core-component
- Remove max_open_sockets=2 override from both httpd servers (use ESP-IDF default of 4) - Increase LWIP_MAX_SOCKETS from 16 to 20 (matching standalone tollgate) - The previous custom tuning (max_open_sockets=2, keep_alive_enable=false, linger_timeout=0) caused socket leaks by interfering with ESP-IDF's internal session management - Verified: 50/50 sequential requests pass, full payment flow works
Diffstat (limited to 'main')
-rw-r--r--main/captive_portal.c1
-rw-r--r--main/tollgate_api.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/main/captive_portal.c b/main/captive_portal.c
index fc21d09..ed14c38 100644
--- a/main/captive_portal.c
+++ b/main/captive_portal.c
@@ -313,7 +313,6 @@ esp_err_t captive_portal_start(const char *ap_ip_str)
313 httpd_config_t config = HTTPD_DEFAULT_CONFIG(); 313 httpd_config_t config = HTTPD_DEFAULT_CONFIG();
314 config.stack_size = 16384; 314 config.stack_size = 16384;
315 config.max_uri_handlers = 20; 315 config.max_uri_handlers = 20;
316 config.max_open_sockets = 2;
317 config.uri_match_fn = httpd_uri_match_wildcard; 316 config.uri_match_fn = httpd_uri_match_wildcard;
318 317
319 esp_err_t ret = httpd_start(&s_server, &config); 318 esp_err_t ret = httpd_start(&s_server, &config);
diff --git a/main/tollgate_api.c b/main/tollgate_api.c
index 9b4612d..71056cf 100644
--- a/main/tollgate_api.c
+++ b/main/tollgate_api.c
@@ -390,7 +390,6 @@ esp_err_t tollgate_api_start(void)
390 config.server_port = 2121; 390 config.server_port = 2121;
391 config.ctrl_port = 32769; 391 config.ctrl_port = 32769;
392 config.max_uri_handlers = 16; 392 config.max_uri_handlers = 16;
393 config.max_open_sockets = 2;
394 config.stack_size = 16384; 393 config.stack_size = 16384;
395 394
396 esp_err_t ret = httpd_start(&s_api_server, &config); 395 esp_err_t ret = httpd_start(&s_api_server, &config);