Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unchoke broken in previous PR #199

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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