Wrap reading files into block_in_place
This commit is contained in:
parent
f845eafca4
commit
bca55891c1
5 changed files with 40 additions and 15 deletions
|
|
@ -6,7 +6,9 @@ use futures::{stream::FuturesUnordered, Stream, StreamExt};
|
|||
use librqbit_core::torrent_metainfo::TorrentMetaV1Info;
|
||||
use log::debug;
|
||||
|
||||
use crate::{peer_connection::PeerConnectionOptions, peer_info_reader};
|
||||
use crate::{
|
||||
peer_connection::PeerConnectionOptions, peer_info_reader, spawn_utils::BlockingSpawner,
|
||||
};
|
||||
use librqbit_core::id20::Id20;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -45,6 +47,7 @@ pub async fn read_metainfo_from_peer_receiver<A: Stream<Item = SocketAddr> + Unp
|
|||
peer_id,
|
||||
info_hash,
|
||||
peer_connection_options,
|
||||
BlockingSpawner::new(true),
|
||||
)
|
||||
.await
|
||||
.with_context(|| format!("error reading metainfo from {}", addr));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue