fix write cache flush issue

This commit is contained in:
Arvid Norberg 2012-05-23 14:59:56 +00:00
parent 68e9b06358
commit 24186f219a
1 changed files with 1 additions and 1 deletions

View File

@ -2120,7 +2120,7 @@ namespace libtorrent
, l, m_settings.write_cache_line_size
, m_settings.disk_cache_algorithm == session_settings::avoid_readback);
if (p->num_blocks == 0) idx.erase(p);
if (p->num_blocks == 0 && p->next_block_to_hash == 0) idx.erase(p);
test_error(j);
TORRENT_ASSERT(!j.storage->error());
}