added asserts for timers

This commit is contained in:
Arvid Norberg 2008-08-16 21:07:45 +00:00
parent 5d919403da
commit 015ab223c9
1 changed files with 2 additions and 0 deletions

View File

@ -268,6 +268,7 @@ private:
if (m_abort) return;
error_code ec;
TORRENT_ASSERT(e.expires_at > time_now());
m_history_timer.expires_at(e.expires_at, ec);
m_history_timer.async_wait(bind(&bandwidth_manager::on_history_expire, this, _1));
}
@ -311,6 +312,7 @@ private:
if (!m_history.empty() && !m_abort)
{
error_code ec;
TORRENT_ASSERT(m_history.back().expires_at > now);
m_history_timer.expires_at(m_history.back().expires_at, ec);
m_history_timer.async_wait(bind(&bandwidth_manager::on_history_expire, this, _1));
}