Better API for stats printing

This commit is contained in:
Igor Katson 2023-11-25 10:11:40 +00:00
parent bec5e1be7f
commit 1bea1f9235
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
8 changed files with 273 additions and 137 deletions

View file

@ -17,7 +17,7 @@ async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt::init();
let dht = Dht::new().await.context("error initializing DHT")?;
let mut stream = dht.get_peers(info_hash).await?;
let mut stream = dht.get_peers(info_hash)?;
let stats_printer = async {
loop {