fixed piece picker and test

This commit is contained in:
Arvid Norberg
2007-03-27 08:53:48 +00:00
parent 29e43d7f62
commit bec03261f5
2 changed files with 16 additions and 20 deletions

View File

@@ -1023,12 +1023,11 @@ namespace libtorrent
piece_pos& p = m_piece_map[block.piece_index];
int prio = p.priority(m_sequenced_download_threshold);
if (prio == 0) return;
if (p.downloading == 0)
{
p.downloading = 1;
move(prio, p.index);
if (prio > 0) move(prio, p.index);
downloading_piece dp;
dp.index = block.piece_index;