1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-06 20:03:46 +01:00

Merge branch 'dev' into batch_exceeds_max_packet_size

This commit is contained in:
J. Nick Koston
2025-06-13 17:01:10 -05:00
committed by GitHub

View File

@@ -260,7 +260,7 @@ uint16_t APIConnection::encode_message_to_buffer(ProtoMessage &msg, uint16_t mes
return 0; // Doesn't fit return 0; // Doesn't fit
} }
// Allocate exact buffer space needed (just the payload, not the overhead) // Allocate buffer space - pass payload size, allocation functions add header/footer space
ProtoWriteBuffer buffer = ProtoWriteBuffer buffer =
is_single ? conn->allocate_single_message_buffer(size) : conn->allocate_batch_message_buffer(size); is_single ? conn->allocate_single_message_buffer(size) : conn->allocate_batch_message_buffer(size);