mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 08:41:59 +00:00
fixes
This commit is contained in:
@@ -249,6 +249,13 @@ OTAResponseTypes ESP8266OTABackend::end() {
|
||||
// Calculate actual bytes written
|
||||
size_t actual_size = this->current_address_ - this->start_address_;
|
||||
|
||||
// Check if any data was written
|
||||
if (actual_size == 0) {
|
||||
ESP_LOGE(TAG, "No data written");
|
||||
this->abort();
|
||||
return OTA_RESPONSE_ERROR_UPDATE_END;
|
||||
}
|
||||
|
||||
// Verify MD5 if set (strict mode), otherwise use lenient mode
|
||||
// In lenient mode (no MD5), we accept whatever was written
|
||||
if (this->md5_set_) {
|
||||
|
||||
Reference in New Issue
Block a user