comment and invariant check

This commit is contained in:
Arvid Norberg 2013-02-07 06:41:11 +00:00
parent d85db40b3c
commit 0e6e943318
1 changed files with 3 additions and 0 deletions

View File

@ -1323,6 +1323,8 @@ namespace aux {
void session_impl::on_trigger_auto_manage()
{
INVARIANT_CHECK;
assert(m_pending_auto_manage);
m_pending_auto_manage = false;
if (!m_need_auto_manage) return;
@ -3205,6 +3207,7 @@ retry:
// ignore connections that already have a torrent, since they
// are ticked through the torrents' second_tick
if (!p->associated_torrent().expired()) continue;
// TODO: have a separate list for these connections, instead of having to loop through all of them
if (m_last_tick - p->connected_time() > seconds(m_settings.handshake_timeout))
p->disconnect(errors::timed_out);
}