Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Jul 10, 2024
1 parent 3a3d554 commit 8d1d1cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neqo-transport/src/pmtud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 }
Expand Down

0 comments on commit 8d1d1cd

Please sign in to comment.