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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user