mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 01:58:39 +00:00
handle failure
This commit is contained in:
@@ -78,6 +78,11 @@ void HttpRequestUpdate::update_task(void *params) {
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Error reading manifest: %d", read_result.error_code);
|
||||
}
|
||||
// Defer to main loop to avoid race condition on component_state_ read-modify-write
|
||||
this_update->defer([this_update]() { this_update->status_set_error(LOG_STR("Failed to read manifest")); });
|
||||
allocator.deallocate(data, container->content_length);
|
||||
container->end();
|
||||
UPDATE_RETURN;
|
||||
}
|
||||
size_t read_index = container->get_bytes_read();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user