fix issue in previous block_cache patch

This commit is contained in:
arvidn 2016-10-22 11:08:19 -04:00
parent 2d2874d252
commit 31d34fec41
1 changed files with 2 additions and 0 deletions

View File

@ -932,6 +932,8 @@ bool block_cache::evict_piece(cached_piece_entry* pe, tailqueue<disk_io_job>& jo
if (pe->ok_to_evict(true)) if (pe->ok_to_evict(true))
{ {
pe->hash.reset();
// append will move the items from pe->jobs onto the end of jobs // append will move the items from pe->jobs onto the end of jobs
jobs.append(pe->jobs); jobs.append(pe->jobs);
TORRENT_ASSERT(pe->jobs.size() == 0); TORRENT_ASSERT(pe->jobs.size() == 0);