fix bug that disabled rarest-first piece picking. introduced when removing speed-affinity in the piece picker

This commit is contained in:
arvidn 2015-11-29 01:12:06 -05:00
parent fd3b53604c
commit e9c0fc8eb5
1 changed files with 6 additions and 2 deletions

View File

@ -856,11 +856,15 @@ namespace libtorrent
} }
else if (t->num_have() < m_settings.get_int(settings_pack::initial_picker_threshold)) else if (t->num_have() < m_settings.get_int(settings_pack::initial_picker_threshold))
{ {
// if we have fewer pieces than a certain threshols // if we have fewer pieces than a certain threshold
// don't pick rare pieces, just pick random ones, // don't pick rare pieces, just pick random ones,
// and prioritize finishing them // and prioritize finishing them
ret |= piece_picker::prioritize_partials; ret |= piece_picker::prioritize_partials;
} }
else
{
ret |= piece_picker::rarest_first;
}
if (m_snubbed) if (m_snubbed)
{ {