Merge pull request #199 from ikatson/fix-unchoke
Fix unchoke broken in previous PR
This commit is contained in:
commit
4e220407ce
1 changed files with 1 additions and 2 deletions
|
|
@ -1223,8 +1223,6 @@ impl PeerHandler {
|
||||||
};
|
};
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
aframe!(self.wait_for_unchoke()).await;
|
|
||||||
|
|
||||||
// If we have full torrent, we don't need to request more pieces.
|
// If we have full torrent, we don't need to request more pieces.
|
||||||
// However we might still need to seed them to the peer.
|
// However we might still need to seed them to the peer.
|
||||||
if self.state.is_finished_and_no_active_streams() {
|
if self.state.is_finished_and_no_active_streams() {
|
||||||
|
|
@ -1244,6 +1242,7 @@ impl PeerHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
update_interest(self, true)?;
|
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
|
// Try steal a pice from a very slow peer first. Otherwise we might wait too long
|
||||||
// to download early pieces.
|
// to download early pieces.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue