From 7753b789b7aca87db4db7aed20e79a41ecb0b225 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 12 Oct 2021 13:07:34 +0200 Subject: Upgrade to tokio 1.0 --- src/peering/basalt.rs | 4 ++-- src/peering/fullmesh.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/peering') diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs index 3c1fc9e..abfe1e4 100644 --- a/src/peering/basalt.rs +++ b/src/peering/basalt.rs @@ -321,7 +321,7 @@ impl Basalt { async fn run_pushpull_loop(self: Arc) { loop { - tokio::time::delay_for(self.param.exchange_interval).await; + tokio::time::sleep(self.param.exchange_interval).await; let peers = self.view.read().unwrap().sample(2); if peers.len() == 2 { @@ -368,7 +368,7 @@ impl Basalt { async fn run_reset_loop(self: Arc) { loop { - tokio::time::delay_for(self.param.reset_interval).await; + tokio::time::sleep(self.param.reset_interval).await; { debug!("KYEV R {}", self.param.reset_count); diff --git a/src/peering/fullmesh.rs b/src/peering/fullmesh.rs index a4b9248..9b55180 100644 --- a/src/peering/fullmesh.rs +++ b/src/peering/fullmesh.rs @@ -241,7 +241,7 @@ impl FullMeshPeeringStrategy { } // 4. Sleep before next loop iteration - tokio::time::delay_for(LOOP_DELAY).await; + tokio::time::sleep(LOOP_DELAY).await; } } -- cgit v1.2.3