minor invariant check tweak
This commit is contained in:
parent
4521b8c902
commit
5284de9d80
|
@ -5744,13 +5744,14 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(m_upload_limit >= 0);
|
||||
TORRENT_ASSERT(m_download_limit >= 0);
|
||||
|
||||
// TODO: why does this invariant not hold?
|
||||
/*
|
||||
if (m_channel_state[upload_channel] & peer_info::bw_limit)
|
||||
TORRENT_ASSERT(m_ses.m_upload_rate.is_queued(this));
|
||||
if (m_channel_state[download_channel] & peer_info::bw_limit)
|
||||
TORRENT_ASSERT(m_ses.m_download_rate.is_queued(this));
|
||||
*/
|
||||
// It's not obvious why this invariant breaks when the peer disconnects
|
||||
if (!m_disconnecting)
|
||||
{
|
||||
if (m_channel_state[upload_channel] & peer_info::bw_limit)
|
||||
TORRENT_ASSERT(m_ses.m_upload_rate.is_queued(this));
|
||||
if (m_channel_state[download_channel] & peer_info::bw_limit)
|
||||
TORRENT_ASSERT(m_ses.m_download_rate.is_queued(this));
|
||||
}
|
||||
|
||||
boost::shared_ptr<torrent> t = m_torrent.lock();
|
||||
|
||||
|
|
Loading…
Reference in New Issue