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();
}
t.second_tick(m_stat, tick_interval_ms);
++i;
t.second_tick(m_stat, tick_interval_ms);
}
// 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());
INVARIANT_CHECK;
boost::weak_ptr<torrent> self(shared_from_this());
#ifndef TORRENT_DISABLE_EXTENSIONS
for (extension_list_t::iterator i = m_extensions.begin()
, end(m_extensions.end()); i != end; ++i)
@ -7679,6 +7681,8 @@ namespace libtorrent
(*i)->tick();
} TORRENT_CATCH (std::exception&) {}
}
if (m_abort) return;
#endif
m_time_scaler--;