Skip to content

Commit

Permalink
Don't resize the sequence number on raw methods (#63)
Browse files Browse the repository at this point in the history
When the user passes in the sequence number: don't resize it. We
should only use the set VarSeqSize when the client is picking the
sequence number.
  • Loading branch information
jamesmunns authored Dec 3, 2024
1 parent 9c01d42 commit e6db2ab
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions source/postcard-rpc/src/host_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ where
let cancel_fut = self.stopper.wait_stopped();
let kkind: VarKeyKind = *self.ctx.kkind.read().unwrap();
rqst.header.key.shrink_to(kkind);
rqst.header.seq_no.resize(self.seq_kind);
let mut resp_key = VarKey::Key8(resp_key);
let mut err_key = VarKey::Key8(self.err_key);
resp_key.shrink_to(kkind);
Expand Down Expand Up @@ -418,7 +417,6 @@ where
pub async fn publish_raw(&self, mut frame: RpcFrame) -> Result<(), IoClosed> {
let kkind: VarKeyKind = *self.ctx.kkind.read().unwrap();
frame.header.key.shrink_to(kkind);
frame.header.seq_no.resize(self.seq_kind);

let cancel_fut = self.stopper.wait_stopped();
let operate_fut = self.out.send(frame);
Expand Down

0 comments on commit e6db2ab

Please sign in to comment.