fixed issue with disk read cache not being cleared when removing torrents
This commit is contained in:
@@ -1650,6 +1650,25 @@ namespace libtorrent
|
||||
post_callback(i->second.callback, i->second, -3);
|
||||
sorted_read_jobs.erase(i++);
|
||||
}
|
||||
jl.unlock();
|
||||
|
||||
mutex_t::scoped_lock l(m_piece_mutex);
|
||||
|
||||
for (cache_t::iterator i = m_read_pieces.begin();
|
||||
i != m_read_pieces.end();)
|
||||
{
|
||||
if (i->storage == j.storage)
|
||||
{
|
||||
free_piece(*i, l);
|
||||
i = m_read_pieces.erase(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
++i;
|
||||
}
|
||||
}
|
||||
l.unlock();
|
||||
release_memory();
|
||||
break;
|
||||
}
|
||||
case disk_io_job::abort_thread:
|
||||
|
Reference in New Issue
Block a user