anacrolix / torrent

Full-featured BitTorrent client package and utilities
Mozilla Public License 2.0
5.51k stars 622 forks source link

Ignore pieces with availability of 0 #922

Closed aritra24 closed 6 months ago

aritra24 commented 6 months ago

resolves: #916 Pieces with zero availability shouldn't consume MaxUnverifiedBytes and shouldn't be prioritised.

anacrolix commented 6 months ago

Thanks for finding this. The solution isn't quite correct. I am mucking around with a more comprehensive solution at https://github.com/anacrolix/torrent/tree/herp.

Specifically I think it's necessary to ensure requests to individual peers aren't starved by pieces that aren't available to from them.

aritra24 commented 6 months ago

Ah that's fair, I wasn't too confident on the solution myself. I can close this pr then. Thanks for helping figure it out ✌🏼

anacrolix commented 6 months ago

Thank you for persisting and finding the issue! I'll have a fix in master shortly.

anacrolix commented 6 months ago

Fixed in 528c5f69d657d6edb7359674473eec1ccff10b9a