From 8d1d1cd301b82bf76220312ef38f8494e7257348 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 10 Jul 2024 13:41:49 +0300 Subject: [PATCH] Fixes --- neqo-transport/src/pmtud.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neqo-transport/src/pmtud.rs b/neqo-transport/src/pmtud.rs index 8686522b0d..626de388e6 100644 --- a/neqo-transport/src/pmtud.rs +++ b/neqo-transport/src/pmtud.rs @@ -29,7 +29,7 @@ const MTU_SIZES_V6: &[usize] = &[ const MAX_PROBES: usize = 3; const PMTU_RAISE_TIMER: Duration = Duration::from_secs(600); -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] enum Probe { NotNeeded, Needed, @@ -135,9 +135,9 @@ impl Pmtud { /// Provides a [`Fn`] that returns true if the packet is a PMTUD probe. /// /// Allows filtering packets without holding a reference to [`Pmtud`]. When - /// in doubt, use [`Pmtud::is_pmtud_probe`]. + /// in doubt, use [`Pmtud::is_probe`]. pub fn is_probe_filter(&self) -> impl Fn(&SentPacket) -> bool { - let probe_state = Probe::Sent; + let probe_state = self.probe_state.clone(); let probe_size = self.probe_size(); move |p: &SentPacket| -> bool { probe_state == Probe::Sent && p.len() == probe_size }