[api] Eliminate rx_buf heap churn and release buffers after initial sync (#12133)
This commit is contained in:
1 parent
26e979d3d5
commit
fb82362e9c
9 files changed
+44
-22
No files matched your search
@@ -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