mirror of
https://github.com/esphome/esphome.git
synced 2026-10-05 02:21:30 +00:00
[api] Eliminate rx_buf heap churn and release buffers after initial sync (#12133)
This commit is contained in:
@@ -210,8 +210,7 @@ APIError APIPlaintextFrameHelper::read_packet(ReadPacketBuffer *buffer) {
|
||||
return aerr;
|
||||
}
|
||||
|
||||
buffer->container = std::move(this->rx_buf_);
|
||||
buffer->data_offset = 0;
|
||||
buffer->data = this->rx_buf_.data();
|
||||
buffer->data_len = this->rx_header_parsed_len_;
|
||||
buffer->type = this->rx_header_parsed_type_;
|
||||
return APIError::OK;
|
||||
|
||||
Reference in New Issue
Block a user