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.
Этот коммит содержится в:
Valentin V. Bartenev
2026-05-06 22:02:57 +03:00
родитель 4d404f5301
Коммит 9b2358416c
+1
Просмотреть файл
@@ -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);
}