From 634e191490d15eb44284df759193fde732f1614c Mon Sep 17 00:00:00 2001 From: ghostant-1017 Date: Fri, 12 Apr 2024 10:00:37 +0800 Subject: [PATCH] Use tokio::time::sleep instead of std::thread::sleep --- crates/node/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/node/src/main.rs b/crates/node/src/main.rs index fee27708..0d8e609d 100644 --- a/crates/node/src/main.rs +++ b/crates/node/src/main.rs @@ -20,7 +20,6 @@ use std::{ net::ToSocketAddrs, path::PathBuf, sync::Arc, - thread::sleep, time::Duration, }; use tokio::sync::mpsc; @@ -225,7 +224,7 @@ async fn run(config: Arc) -> Result<()> { } // Sync the whitelist every 10min. - sleep(Duration::from_secs(600)); + tokio::time::sleep(Duration::from_secs(600)).await; } }); }