]> git.bitcoin.ninja Git - ldk-sample/commitdiff
switch missed tick behavior to delay instead of default burst
authorDom Zippilli <domz@tbd.email>
Wed, 12 Jul 2023 18:54:10 +0000 (11:54 -0700)
committerDom Zippilli <domz@tbd.email>
Wed, 12 Jul 2023 18:54:10 +0000 (11:54 -0700)
src/main.rs

index 5a3389e83430852276244d548f48e19b131a60c9..de7c16641d3eb0314fec0d6226c63d53adadab93 100644 (file)
@@ -759,6 +759,7 @@ async fn start_ldk() {
        let stop_connect = Arc::clone(&stop_listen_connect);
        tokio::spawn(async move {
                let mut interval = tokio::time::interval(Duration::from_secs(1));
+               interval.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Delay);
                loop {
                        interval.tick().await;
                        match disk::read_channel_peer_data(Path::new(&peer_data_path)) {