forked from premiere/premiere-libtorrent
only make snubbed peers invert the piece picking strategy when we're doing rarest first (i.e. snubbed peers do common-first). Specifically, this prevents snubbed peers from picking from the end of the torrent when in sequential mode
This commit is contained in:
parent
ba294e6594
commit
5b5b280b87
|
@ -880,15 +880,16 @@ namespace libtorrent
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret |= piece_picker::rarest_first;
|
ret |= piece_picker::rarest_first;
|
||||||
}
|
|
||||||
|
|
||||||
if (m_snubbed)
|
if (m_snubbed)
|
||||||
{
|
{
|
||||||
// snubbed peers should request
|
// snubbed peers should request
|
||||||
// the common pieces first, just to make
|
// the common pieces first, just to make
|
||||||
// it more likely for all snubbed peers to
|
// it more likely for all snubbed peers to
|
||||||
// request blocks from the same piece
|
// request blocks from the same piece
|
||||||
ret |= piece_picker::reverse;
|
ret |= piece_picker::reverse;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_settings.get_bool(settings_pack::prioritize_partial_pieces))
|
if (m_settings.get_bool(settings_pack::prioritize_partial_pieces))
|
||||||
|
|
Loading…
Reference in New Issue