Skip to content

Commit

Permalink
chore: avoid reserving extra 4 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
ozwaldorf committed Oct 16, 2023
1 parent 6c23d66 commit 5a19a97
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions core/handshake/src/transports/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,7 @@ impl TransportReceiver for TcpReceiver {

// Take the frame bytes from the buffer
let bytes = self.buffer.split_to(len);
// Allocate for the next delimiter
self.buffer.reserve(4);

// decode the frame
// Decode the frame
match schema::RequestFrame::decode(&bytes[4..]) {
Ok(frame) => return Some(frame),
Err(_) => {
Expand Down

0 comments on commit 5a19a97

Please sign in to comment.