fixed issue when aborting an http connection

This commit is contained in:
Arvid Norberg 2007-04-10 18:53:12 +00:00
parent 4ceb6a02ea
commit e65206309c
1 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,6 @@ void http_connection::close()
{
m_timer.cancel();
m_limiter_timer.cancel();
m_limiter_timer_active = false;
m_sock.close();
m_hostname.clear();
m_port.clear();
@ -272,8 +271,9 @@ 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
if ((e == asio::error::operation_aborted
&& m_limiter_timer_active)
|| !m_sock.is_open())
{
if (!m_bottled || !m_called)
m_handler(e, m_parser, 0, 0);