mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-25 05:54:19 +00:00
trying to fix/understand assertion failure
version: 1.0.0.0 $Rev: 7680 $ file: 'peer_connection.cpp' line: 5715 function: void libtorrent::peer_connection::check_invariant() const expression: m_outstanding_bytes >= 0
This commit is contained in:
parent
cd4147d772
commit
d8b8ff4b4f
@ -2185,7 +2185,8 @@ namespace libtorrent
|
||||
TORRENT_ASSERT(m_download_queue.front().block == b);
|
||||
m_download_queue.front().not_wanted = true;
|
||||
}
|
||||
m_outstanding_bytes += r.length;
|
||||
if( r.length > 0 )
|
||||
m_outstanding_bytes += r.length;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3271,6 +3272,7 @@ namespace libtorrent
|
||||
|
||||
TORRENT_ASSERT(verify_piece(t->to_req(block.block)));
|
||||
m_download_queue.push_back(block);
|
||||
TORRENT_ASSERT(block_size >= 0);
|
||||
m_outstanding_bytes += block_size;
|
||||
#if !defined TORRENT_DISABLE_INVARIANT_CHECKS && defined TORRENT_DEBUG
|
||||
check_invariant();
|
||||
|
Loading…
x
Reference in New Issue
Block a user