diff --git a/quinn-proto/src/connection/mod.rs b/quinn-proto/src/connection/mod.rs index a5edaa0d6..93399042e 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -1855,11 +1855,6 @@ impl Connection { }; path.challenges_sent.clear(); path.challenge_pending = false; - - // TODO(flub): not sure yet - self.timers - .stop(Timer::PerPath(path_id, PathTimer::LossDetection)); - debug!("new path validation failed"); if let Err(err) = self.close_path( now, @@ -1886,6 +1881,7 @@ impl Connection { PathTimer::PathAbandoned => { // The path was abandoned and 3*PTO has expired since. Clean up all // remaining state and install stateless reset token. + self.timers.stop_per_path(path_id); if let Some(loc_cid_state) = self.local_cid_state.remove(&path_id) { let (min_seq, max_seq) = loc_cid_state.active_seq(); for seq in min_seq..=max_seq { diff --git a/quinn-proto/src/connection/timer.rs b/quinn-proto/src/connection/timer.rs index 8e1ff7f36..c7e68474c 100644 --- a/quinn-proto/src/connection/timer.rs +++ b/quinn-proto/src/connection/timer.rs @@ -278,6 +278,15 @@ impl TimerTable { } } + /// Stops all per-path timers + pub(super) fn stop_per_path(&mut self, path_id: PathId) { + for timer in PathTimer::VALUES { + if let Some(e) = self.path_timers.get_mut(&path_id) { + e.stop(timer); + } + } + } + /// Get the next queued timeout pub(super) fn peek(&mut self) -> Option { // TODO: this is currently linear in the number of paths