potentially cured the symptoms of a bug where a torrent can be destructed without having all its connections closed first

This commit is contained in:
Arvid Norberg 2005-11-08 00:56:26 +00:00
parent 7d5285610c
commit 0ae3b24bd2
1 changed files with 5 additions and 0 deletions

View File

@ -344,6 +344,11 @@ namespace libtorrent
torrent::~torrent()
{
assert(m_connections.empty());
if (!m_connections.empty())
{
disconnect_all();
m_ses.purge_connections();
}
if (m_ses.m_abort) m_abort = true;
}