mirror of
https://github.com/esphome/esphome.git
synced 2025-10-03 02:22:25 +01:00
cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user