1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 08:41:59 +00:00

Update esphome/components/api/api_connection.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2026-02-05 14:02:25 +01:00
committed by GitHub
parent ef6f93a40c
commit 8300e9ca87

View File

@@ -1885,7 +1885,7 @@ void APIConnection::process_batch_() {
this->prepare_first_message_buffer(shared_buf, header_padding, total_estimated_size);
// Fast path for single message - allocate exact size needed
// Fast path for single message - buffer already allocated above
if (num_items == 1) {
const auto &item = this->deferred_batch_[0];
// Let dispatch_message_ calculate size and encode if it fits