1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-03 18:42:23 +01:00
This commit is contained in:
J. Nick Koston
2025-06-29 22:19:29 -05:00
parent 4082634e6d
commit 8563a5785f
2 changed files with 3 additions and 7 deletions

View File

@@ -177,10 +177,7 @@ void OTARequestHandler::handleRequest(AsyncWebServerRequest *request) {
}
#endif // USE_ARDUINO
#ifdef USE_ESP_IDF
// For ESP-IDF, we use direct send() instead of beginResponse()
// to ensure the response is sent immediately before the reboot.
// If ota_backend_ is nullptr and we got here, the update completed (either success or failure)
// We'll use ota_success_ flag set by handleUpload to determine the result
// Send response based on the OTA result
request->send(200, "text/plain", this->ota_success_ ? "Update Successful!" : "Update Failed!");
return;
#endif // USE_ESP_IDF