mirror of
https://github.com/esphome/esphome.git
synced 2025-09-07 13:52:20 +01:00
Merge branch 'api_polish' into integration
This commit is contained in:
@@ -1685,7 +1685,8 @@ void APIConnection::process_batch_() {
|
|||||||
|
|
||||||
// Pre-calculate exact buffer size needed based on message types
|
// Pre-calculate exact buffer size needed based on message types
|
||||||
uint32_t total_estimated_size = num_items * (header_padding + footer_size);
|
uint32_t total_estimated_size = num_items * (header_padding + footer_size);
|
||||||
for (const auto &item : this->deferred_batch_.items) {
|
for (size_t i = 0; i < this->deferred_batch_.size(); i++) {
|
||||||
|
const auto &item = this->deferred_batch_[i];
|
||||||
total_estimated_size += item.estimated_size;
|
total_estimated_size += item.estimated_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user