explicit cache fixes

This commit is contained in:
Arvid Norberg 2010-01-17 21:57:24 +00:00
parent 36809c7007
commit 8c60c75547
1 changed files with 3 additions and 2 deletions

View File

@ -1900,7 +1900,7 @@ namespace aux {
{
// if we don't have any connections at all, split the
// cache evenly across all torrents
cache_size = cache_size / m_torrents.size();
cache_size = cache_size / (std::max)(int(m_torrents.size()), 1);
}
else
{
@ -1908,7 +1908,8 @@ namespace aux {
/ m_connections.size();
}
least_recently_refreshed->second->refresh_explicit_cache(cache_size);
if (least_recently_refreshed != m_torrents.end())
least_recently_refreshed->second->refresh_explicit_cache(cache_size);
++m_next_explicit_cache_torrent;
}