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 14:44:47 -05:00
parent b70188ba4b
commit 80dd6c111d
2 changed files with 9 additions and 23 deletions

View File

@@ -174,12 +174,8 @@ void OTARequestHandler::handleRequest(AsyncWebServerRequest *request) {
request->send(response);
#endif
#if defined(USE_ESP_IDF) && defined(USE_WEBSERVER_OTA)
AsyncWebServerResponse *response;
if (this->ota_started_ && this->ota_backend_) {
response = request->beginResponse(200, "text/plain", "Update Successful!");
} else {
response = request->beginResponse(200, "text/plain", "Update Failed!");
}
AsyncWebServerResponse *response = request->beginResponse(
200, "text/plain", (this->ota_started_ && this->ota_backend_) ? "Update Successful!" : "Update Failed!");
response->addHeader("Connection", "close");
request->send(response);
#endif