add asserts for peers to be destructed in the network thread
This commit is contained in:
parent
418c1e8190
commit
697fa4911b
|
@ -197,6 +197,7 @@ namespace libtorrent
|
|||
|
||||
bt_peer_connection::~bt_peer_connection()
|
||||
{
|
||||
TORRENT_ASSERT(m_ses.is_network_thread());
|
||||
}
|
||||
|
||||
void bt_peer_connection::on_connected()
|
||||
|
|
|
@ -918,6 +918,7 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(!m_in_constructor);
|
||||
TORRENT_ASSERT(m_disconnecting);
|
||||
TORRENT_ASSERT(m_disconnect_started);
|
||||
TORRENT_ASSERT(m_ses.is_network_thread());
|
||||
|
||||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||
m_in_use = 0;
|
||||
|
@ -950,7 +951,7 @@ namespace libtorrent
|
|||
// TORRENT_ASSERT(!m_ses.has_peer(this));
|
||||
TORRENT_ASSERT(m_request_queue.empty());
|
||||
TORRENT_ASSERT(m_download_queue.empty());
|
||||
#ifdef TORRENT_DEBUG
|
||||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||
for (aux::session_impl::torrent_map::const_iterator i = m_ses.m_torrents.begin()
|
||||
, end(m_ses.m_torrents.end()); i != end; ++i)
|
||||
TORRENT_ASSERT(!i->second->has_peer(this));
|
||||
|
|
Loading…
Reference in New Issue