prioritize partials once they reach a certain threshold, to keep them from growing
This commit is contained in:
parent
1ac3b8298c
commit
ca4ab436d0
|
@ -1304,6 +1304,9 @@ namespace libtorrent
|
|||
, int prefer_whole_pieces, void* peer, piece_state_t speed
|
||||
, int options, std::vector<int> const& suggested_pieces) const
|
||||
{
|
||||
// prevent the number of partial pieces to grow indefinitely
|
||||
if (m_downloads.size() > 20) options |= prioritize_partials;
|
||||
|
||||
// only one of rarest_first and sequential can be set.
|
||||
TORRENT_ASSERT(bool(options & rarest_first)
|
||||
+ bool(options & sequential) <= 1);
|
||||
|
|
Loading…
Reference in New Issue