From 5f6351146a47ab836d8cfc7c1744037d74c2772f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 5 Oct 2008 19:47:55 +0000 Subject: [PATCH] removed assert that could cause dead-lock in debug mode --- src/disk_io_thread.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index 31c60171f..0635a60b5 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -635,20 +635,6 @@ namespace libtorrent TORRENT_ASSERT(j.storage); 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, l2); - if (p != m_pieces.end()) - { - int block = j.offset / m_block_size; - char const* buffer = p->blocks[block]; - TORRENT_ASSERT(buffer == 0); - } - } -#endif std::list::reverse_iterator i = m_jobs.rbegin(); if (j.action == disk_io_job::read)