fixed invalid assert in session_impl::recalculate_unchoke_slots()

This commit is contained in:
Arvid Norberg 2010-06-25 14:14:36 +00:00
parent 717c7ba962
commit d3970f62a3
1 changed files with 6 additions and 2 deletions

View File

@ -2777,10 +2777,14 @@ namespace aux {
{
if (prev != end)
{
boost::shared_ptr<torrent> t1 = (*prev)->associated_torrent().lock();
TORRENT_ASSERT(t1);
boost::shared_ptr<torrent> t2 = (*i)->associated_torrent().lock();
TORRENT_ASSERT(t2);
TORRENT_ASSERT((*prev)->uploaded_since_unchoke() * 1000
/ total_milliseconds(unchoke_interval)
/ total_milliseconds(unchoke_interval) * t1->priority()
>= (*i)->uploaded_since_unchoke() * 1000
/ total_milliseconds(unchoke_interval));
/ total_milliseconds(unchoke_interval) * t2->priority());
}
prev = i;
}