Use tokio_util::CancellationToken everywhere
This commit is contained in:
parent
53868ad45e
commit
bed7433d8e
16 changed files with 176 additions and 178 deletions
|
|
@ -16,8 +16,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let (dht, worker) = DhtBuilder::new().await.context("error initializing DHT")?;
|
||||
tokio::spawn(worker);
|
||||
let dht = DhtBuilder::new().await.context("error initializing DHT")?;
|
||||
|
||||
let mut stream = dht.get_peers(info_hash, None)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue