support extensions removing torrents in tick()

This commit is contained in:
Arvid Norberg 2013-08-15 06:10:41 +00:00
parent a4d4b362e6
commit 1b60710493
2 changed files with 5 additions and 1 deletions

View File

@ -3321,8 +3321,8 @@ retry:
num_downloads_peers += t.num_peers(); num_downloads_peers += t.num_peers();
} }
t.second_tick(m_stat, tick_interval_ms);
++i; ++i;
t.second_tick(m_stat, tick_interval_ms);
} }
// some people claim that there sometimes can be cases where // some people claim that there sometimes can be cases where

View File

@ -7671,6 +7671,8 @@ namespace libtorrent
TORRENT_ASSERT(m_ses.is_network_thread()); TORRENT_ASSERT(m_ses.is_network_thread());
INVARIANT_CHECK; INVARIANT_CHECK;
boost::weak_ptr<torrent> self(shared_from_this());
#ifndef TORRENT_DISABLE_EXTENSIONS #ifndef TORRENT_DISABLE_EXTENSIONS
for (extension_list_t::iterator i = m_extensions.begin() for (extension_list_t::iterator i = m_extensions.begin()
, end(m_extensions.end()); i != end; ++i) , end(m_extensions.end()); i != end; ++i)
@ -7679,6 +7681,8 @@ namespace libtorrent
(*i)->tick(); (*i)->tick();
} TORRENT_CATCH (std::exception&) {} } TORRENT_CATCH (std::exception&) {}
} }
if (m_abort) return;
#endif #endif
m_time_scaler--; m_time_scaler--;