fix in http_connection where the handler was sometimes not called when rate limited and aborted

This commit is contained in:
Arvid Norberg 2007-04-06 23:01:27 +00:00
parent 94fab39d4c
commit 5f3797cf80
1 changed files with 6 additions and 0 deletions

View File

@ -270,6 +270,12 @@ void http_connection::on_read(asio::error_code const& e
void http_connection::on_assign_bandwidth(asio::error_code const& e)
{
if (e == asio::error::operation_aborted
&& m_limiter_timer_active)
{
if (!m_bottled || !m_called)
m_handler(e, m_parser, 0, 0);
}
m_limiter_timer_active = false;
if (e) return;