forked from premiere/premiere-libtorrent
fixed race condition in invariant check in disk io thread (only affected debug builds)
This commit is contained in:
parent
195521db65
commit
0f6ec06e12
|
@ -636,10 +636,11 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(j.buffer_size <= m_block_size);
|
||||
mutex_t::scoped_lock l(m_queue_mutex);
|
||||
#ifndef NDEBUG
|
||||
mutex_t::scoped_lock l2(m_piece_mutex);
|
||||
if (j.action == disk_io_job::write)
|
||||
{
|
||||
cache_t::iterator p
|
||||
= find_cached_piece(m_pieces, j, l);
|
||||
= find_cached_piece(m_pieces, j, l2);
|
||||
if (p != m_pieces.end())
|
||||
{
|
||||
int block = j.offset / m_block_size;
|
||||
|
|
Loading…
Reference in New Issue