1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-03 02:22:25 +01:00
This commit is contained in:
J. Nick Koston
2025-06-29 18:59:09 -05:00
parent c420bf5f4f
commit 5205ff5c43
4 changed files with 5 additions and 6 deletions

View File

@@ -129,14 +129,15 @@ void OTARequestHandler::handleUpload(AsyncWebServerRequest *request, const Strin
auto result = backend->begin(0);
if (result != ota::OTA_RESPONSE_OK) {
ESP_LOGE(TAG, "OTA begin failed: %d", result);
this->ota_success_ = false;
return;
}
// Store the backend pointer
this->ota_backend_ = backend.release();
this->ota_started_ = true;
} else if (!this->ota_started_ || !this->ota_backend_) {
}
if (!this->ota_started_ || !this->ota_backend_) {
// Begin failed or was aborted
return;
}