fix related to piece priorities

This commit is contained in:
Arvid Norberg 2007-03-20 19:34:10 +00:00
parent 776b399a97
commit 00a7546f7e
1 changed files with 8 additions and 1 deletions

View File

@ -548,7 +548,14 @@ namespace libtorrent
piece_pos& p = m_piece_map[index];
int priority = p.priority(m_sequenced_download_threshold);
p.downloading = 0;
move(priority, p.index);
if (priority == 0)
{
add(index);
}
else
{
move(priority, p.index);
}
}
void piece_picker::inc_refcount(int i)