From 2ad288199d90e23055692f5e7db266a8936e5910 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Sun, 19 Nov 2023 19:42:19 +0000 Subject: [PATCH] timed existence for lock time debugging --- crates/librqbit/src/torrent_state.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/librqbit/src/torrent_state.rs b/crates/librqbit/src/torrent_state.rs index 65aae19..5af3f5d 100644 --- a/crates/librqbit/src/torrent_state.rs +++ b/crates/librqbit/src/torrent_state.rs @@ -654,6 +654,11 @@ impl TorrentState { } }; + // If peer is already set not needed, ignore. + if let PeerState::NotNeeded = pe.value().state { + return; + } + if error.is_none() { debug!("peer died without errors, not re-queueing"); pe.value_mut().state = PeerState::NotNeeded;