diff --git a/crates/librqbit/src/torrent_state.rs b/crates/librqbit/src/torrent_state.rs index b9180e8..b8ff1e9 100644 --- a/crates/librqbit/src/torrent_state.rs +++ b/crates/librqbit/src/torrent_state.rs @@ -667,6 +667,8 @@ impl TorrentState { } } PeerState::NotNeeded => { + // Restore it as std::mem::take() replaced it above. + pe.value_mut().state = PeerState::NotNeeded; return; } s @ PeerState::Queued | s @ PeerState::Dead => {