diff --git a/crates/ptth_relay/src/lib.rs b/crates/ptth_relay/src/lib.rs index 0c69229..e5e8a73 100644 --- a/crates/ptth_relay/src/lib.rs +++ b/crates/ptth_relay/src/lib.rs @@ -490,6 +490,7 @@ async fn handle_endless_source (gib: usize, throttle: Option ) }; let mut interval = tokio::time::interval (Duration::from_millis (1000)); + interval.set_missed_tick_behavior (tokio::time::MissedTickBehavior::Skip); let mut blocks_sent = 0; while blocks_sent < num_blocks { @@ -771,6 +772,7 @@ pub async fn run_relay ( let state_2 = state.clone (); tokio::spawn (async move { let mut reload_interval = tokio::time::interval (Duration::from_secs (60)); + reload_interval.set_missed_tick_behavior (tokio::time::MissedTickBehavior::Skip); loop { reload_interval.tick ().await; diff --git a/crates/ptth_server/src/file_server/metrics.rs b/crates/ptth_server/src/file_server/metrics.rs index 062ad1e..2637c65 100644 --- a/crates/ptth_server/src/file_server/metrics.rs +++ b/crates/ptth_server/src/file_server/metrics.rs @@ -106,6 +106,7 @@ impl Interval { } let mut interval = tokio::time::interval (Duration::from_secs (60)); + interval.set_missed_tick_behavior (tokio::time::MissedTickBehavior::Skip); let mut counter = 0_u64;