forked from premiere/premiere-libtorrent
explicit cache fixes
This commit is contained in:
parent
36809c7007
commit
8c60c75547
|
@ -1900,7 +1900,7 @@ namespace aux {
|
||||||
{
|
{
|
||||||
// if we don't have any connections at all, split the
|
// if we don't have any connections at all, split the
|
||||||
// cache evenly across all torrents
|
// cache evenly across all torrents
|
||||||
cache_size = cache_size / m_torrents.size();
|
cache_size = cache_size / (std::max)(int(m_torrents.size()), 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1908,6 +1908,7 @@ namespace aux {
|
||||||
/ m_connections.size();
|
/ m_connections.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (least_recently_refreshed != m_torrents.end())
|
||||||
least_recently_refreshed->second->refresh_explicit_cache(cache_size);
|
least_recently_refreshed->second->refresh_explicit_cache(cache_size);
|
||||||
++m_next_explicit_cache_torrent;
|
++m_next_explicit_cache_torrent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue