ME Buffer reuse + Bytes Len over Full + Seq-no over Wrap-add

Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
Alexey
2026-02-23 03:52:37 +03:00
parent ecad96374a
commit eaba926fe5
3 changed files with 45 additions and 16 deletions

View File

@@ -223,7 +223,7 @@ pub(crate) struct RpcWriter {
impl RpcWriter {
pub(crate) async fn send(&mut self, payload: &[u8]) -> Result<()> {
let frame = build_rpc_frame(self.seq_no, payload, self.crc_mode);
self.seq_no += 1;
self.seq_no = self.seq_no.wrapping_add(1);
let pad = (16 - (frame.len() % 16)) % 16;
let mut buf = frame;