fix count for non-ip-filtered torrents

This commit is contained in:
Arvid Norberg 2011-03-03 03:57:47 +00:00
parent 0aff6803fb
commit 2bdfea4248
1 changed files with 7 additions and 0 deletions

View File

@ -838,6 +838,13 @@ namespace libtorrent
torrent::~torrent()
{
if (!m_apply_ip_filter)
{
TORRENT_ASSERT(m_ses.m_non_filtered_torrents > 0);
--m_ses.m_non_filtered_torrents;
m_apply_ip_filter = true;
}
TORRENT_ASSERT(m_ses.is_network_thread());
// The invariant can't be maintained here, since the torrent
// is being destructed, all weak references to it have been