Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Use tokio::time::sleep instead of std::thread::sleep (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostant-1017 authored May 8, 2024
1 parent 0343fdd commit b811d3a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use std::{
net::ToSocketAddrs,
path::PathBuf,
sync::Arc,
thread::sleep,
time::Duration,
};
use tokio::sync::mpsc;
Expand Down Expand Up @@ -225,7 +224,7 @@ async fn run(config: Arc<Config>) -> Result<()> {
}

// Sync the whitelist every 10min.
sleep(Duration::from_secs(600));
tokio::time::sleep(Duration::from_secs(600)).await;
}
});
}
Expand Down

0 comments on commit b811d3a

Please sign in to comment.