consistency fixes related to shutting down

This commit is contained in:
Arvid Norberg
2006-12-21 22:20:28 +00:00
parent 755d9f5967
commit f83db0a423
3 changed files with 26 additions and 10 deletions

View File

@@ -971,7 +971,7 @@ namespace libtorrent
assert(i != m_downloads.end());
assert((int)i->finished_blocks.count() <= m_blocks_per_piece);
int max_blocks = blocks_in_piece(index);
if ((int)i->finished_blocks.count() != max_blocks) return false;
if ((int)i->finished_blocks.count() < max_blocks) return false;
assert((int)i->requested_blocks.count() == max_blocks);
return true;