Use tokio_util::CancellationToken everywhere

This commit is contained in:
Igor Katson 2023-12-07 08:10:17 +00:00
parent 53868ad45e
commit bed7433d8e
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
16 changed files with 176 additions and 178 deletions

View file

@ -107,8 +107,7 @@ mod tests {
init_logging();
let info_hash = Id20::from_str("cab507494d02ebb1178b38f2e9d7be299c86b862").unwrap();
let (dht, run_dht) = DhtBuilder::new().await.unwrap();
tokio::spawn(run_dht);
let dht = DhtBuilder::new().await.unwrap();
let peer_rx = dht.get_peers(info_hash, None).unwrap();
let peer_id = generate_peer_id();