From 82f167d50dddd99602b221ea7bcf8a693c401f26 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Sat, 7 Dec 2024 12:14:59 +0000 Subject: [PATCH] Removed the overly conservative check --- crates/librqbit/src/session.rs | 1 + crates/librqbit/src/torrent_state/mod.rs | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/librqbit/src/session.rs b/crates/librqbit/src/session.rs index f942f42..fb3da41 100644 --- a/crates/librqbit/src/session.rs +++ b/crates/librqbit/src/session.rs @@ -1168,6 +1168,7 @@ impl Session { } let _e = managed_torrent.shared.span.clone().entered(); + managed_torrent .start(peer_rx, opts.paused) .context("error starting torrent")?; diff --git a/crates/librqbit/src/torrent_state/mod.rs b/crates/librqbit/src/torrent_state/mod.rs index c98afd4..90b8f60 100644 --- a/crates/librqbit/src/torrent_state/mod.rs +++ b/crates/librqbit/src/torrent_state/mod.rs @@ -399,10 +399,6 @@ impl ManagedTorrent { } } - if !start_paused && peer_rx.is_none() { - bail!("logic bug: start(start_paused=false, peer_rx=None) called. peer_rx must be set if starting the torrent") - } - let session = self .shared .session