[api] Eliminate rx_buf heap churn and release buffers after initial sync (#12133)

This commit is contained in:
J. Nick Koston
2025-11-28 12:13:29 -06:00
committed by GitHub
parent 26e979d3d5
commit fb82362e9c
9 changed files with 44 additions and 22 deletions
@@ -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;