From 0e6e9433189216e11218408a0e3f54da8ba2c0a1 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 7 Feb 2013 06:41:11 +0000 Subject: [PATCH] comment and invariant check --- src/session_impl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index d1f0ff74a..48068d14c 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -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); }