Skip to content

Commit 848d3eb

Browse files
committed
avoid duplicating advertisement of NEW_CONNECTION_ID frames
As well as RETIRE_CONNECTION_ID frames
1 parent dd3caa9 commit 848d3eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quiche/src/cid.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ impl ConnectionIdentifiers {
12461246
pub fn mark_advertise_new_scid_seq(
12471247
&mut self, path_id: PathId, scid_seq: CIDSeq, advertise: bool,
12481248
) {
1249-
if advertise {
1249+
if advertise && !self.advertise_new_scid_seqs.contains(&(path_id, scid_seq)) {
12501250
self.advertise_new_scid_seqs.push_back((path_id, scid_seq));
12511251
} else if let Some(index) = self
12521252
.advertise_new_scid_seqs
@@ -1264,7 +1264,7 @@ impl ConnectionIdentifiers {
12641264
pub fn mark_retire_dcid_seq(
12651265
&mut self, path_id: PathId, dcid_seq: CIDSeq, retire: bool,
12661266
) {
1267-
if retire {
1267+
if retire && !self.retire_dcid_seqs.contains(&(path_id, dcid_seq)) {
12681268
self.retire_dcid_seqs.push_back((path_id, dcid_seq));
12691269
} else if let Some(index) = self
12701270
.retire_dcid_seqs

0 commit comments

Comments
 (0)