Skip to content

Commit

Permalink
Introduce Connection::local_address_changed for active migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Apr 4, 2024
1 parent ff487f0 commit 1832643
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quinn-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2909,6 +2909,12 @@ impl Connection {
);
}

/// Handle a change in the local address, i.e. an active migration
pub fn local_address_changed(&mut self) {
self.update_rem_cid();
self.ping();
}

/// Switch to a previously unused remote connection ID, if possible
fn update_rem_cid(&mut self) {
let (reset_token, retired) = match self.rem_cids.next() {
Expand Down

0 comments on commit 1832643

Please sign in to comment.