Skip to content

Commit

Permalink
Fix the issue where sending coalesced packets occasionally causes a p…
Browse files Browse the repository at this point in the history
…anic (Tencent#430)

Co-authored-by: majiange <majiange@17paipai.cn>
  • Loading branch information
jiangema and majiange authored Nov 15, 2024
1 parent d1057f7 commit 367a79c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/connection/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,11 @@ impl Connection {
}

// Encode packet number
let len = packet::encode_packet_num(pkt_num, pkt_num_len, &mut out[pkt_num_offset..left])?;
let len = packet::encode_packet_num(
pkt_num,
pkt_num_len,
&mut out[pkt_num_offset..pkt_num_offset + pkt_num_len],
)?;
let payload_offset = pkt_num_offset + len;

// Write frames into the packet payload
Expand Down

0 comments on commit 367a79c

Please sign in to comment.