Skip to content

Commit

Permalink
fix: Don't retire zero-length connection IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Oct 15, 2024
1 parent 9b5ec71 commit b236d08
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions neqo-transport/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ impl Paths {
}

fn retire(to_retire: &mut Vec<u64>, retired: &PathRef) {
let seqno = retired
.borrow()
.remote_cid
.as_ref()
.unwrap()
.sequence_number();
to_retire.push(seqno);
if let Some(cid) = &retired.borrow().remote_cid {
if cid.connection_id().len() == 0 {
qinfo!("Not retiring zero-len connection ID");

Check warning on line 157 in neqo-transport/src/path.rs

View check run for this annotation

Codecov / codecov/patch

neqo-transport/src/path.rs#L157

Added line #L157 was not covered by tests
} else {
to_retire.push(cid.sequence_number());
}
}

Check warning on line 161 in neqo-transport/src/path.rs

View check run for this annotation

Codecov / codecov/patch

neqo-transport/src/path.rs#L161

Added line #L161 was not covered by tests
}

/// Adopt a temporary path as permanent.
Expand Down

0 comments on commit b236d08

Please sign in to comment.