fixed rare piece picker bug
This commit is contained in:
@@ -833,14 +833,8 @@ namespace libtorrent
|
||||
|
||||
if (new_priority == prev_priority) return;
|
||||
if (m_dirty) return;
|
||||
if (prev_priority == -1)
|
||||
{
|
||||
add(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
update(prev_priority, p.index);
|
||||
}
|
||||
if (prev_priority == -1) add(index);
|
||||
else update(prev_priority, p.index);
|
||||
}
|
||||
|
||||
void piece_picker::inc_refcount_all()
|
||||
@@ -2252,7 +2246,7 @@ namespace libtorrent
|
||||
|
||||
if (m_dirty) return;
|
||||
if (new_priority == prev_priority) return;
|
||||
if (prev_priority == -1) add(p.index);
|
||||
if (prev_priority == -1) add(block.piece_index);
|
||||
else update(prev_priority, p.index);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user