Skip to content

Commit

Permalink
Merge pull request #199 from ikatson/fix-unchoke
Browse files Browse the repository at this point in the history
Fix unchoke broken in previous PR
  • Loading branch information
ikatson authored Aug 19, 2024
2 parents e3ab7e2 + e0c459e commit 4e22040
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/librqbit/src/torrent_state/live/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,8 +1223,6 @@ impl PeerHandler {
};

loop {
aframe!(self.wait_for_unchoke()).await;

// If we have full torrent, we don't need to request more pieces.
// However we might still need to seed them to the peer.
if self.state.is_finished_and_no_active_streams() {
Expand All @@ -1244,6 +1242,7 @@ impl PeerHandler {
}

update_interest(self, true)?;
aframe!(self.wait_for_unchoke()).await;

// Try steal a pice from a very slow peer first. Otherwise we might wait too long
// to download early pieces.
Expand Down

0 comments on commit 4e22040

Please sign in to comment.