1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

Revert "Revert "preen""

This reverts commit d83ed9ebe1.
This commit is contained in:
J. Nick Koston
2025-08-13 23:06:23 -05:00
parent 58074e0357
commit 09fa349349

View File

@@ -308,8 +308,7 @@ uint16_t APIConnection::encode_message_to_buffer(ProtoMessage &msg, uint8_t mess
}
// Encode directly into buffer
ProtoWriteBuffer buffer{&shared_buf};
msg.encode(buffer);
msg.encode({&shared_buf});
// Calculate actual encoded size (not including header that was already added)
size_t actual_payload_size = shared_buf.size() - size_before_encode;