From 9b2358416ca6afda1de26c0954258a960bb5f3d7 Mon Sep 17 00:00:00 2001 From: "Valentin V. Bartenev" Date: Wed, 6 May 2026 22:02:57 +0300 Subject: [PATCH] Web: yield in sendProgmemChunked loop to prevent task WDT reset When sending large PROGMEM content in chunks over HTTPS, the lwIP TCP/IP task (tiT) could monopolize CPU 0 for an extended period without ever yielding, starving the IDLE0 task and triggering the task watchdog timer. Add vTaskDelay(1) at the end of each iteration in sendProgmemChunked() to yield to the scheduler between chunks, allowing the IDLE task to reset the watchdog and preventing spurious reboots during web panel page loads. --- src/helpers/web/WebPanelServer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/helpers/web/WebPanelServer.cpp b/src/helpers/web/WebPanelServer.cpp index 367c406e..fb51fea6 100644 --- a/src/helpers/web/WebPanelServer.cpp +++ b/src/helpers/web/WebPanelServer.cpp @@ -79,6 +79,7 @@ esp_err_t sendProgmemChunked(httpd_req_t* req, const char* text) { return ESP_FAIL; } offset += chunk_len; + vTaskDelay(1); } return httpd_resp_send_chunk(req, nullptr, 0); }