From db65ec2fd359fcc06c87c85ff63e0a33e9fb3d1c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 1 Apr 2012 00:42:04 +0000 Subject: [PATCH] fix shutdown delay issue --- src/http_connection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/http_connection.cpp b/src/http_connection.cpp index 2b56c710b..25235d24e 100644 --- a/src/http_connection.cpp +++ b/src/http_connection.cpp @@ -694,6 +694,9 @@ void http_connection::on_write(error_code const& e) #if defined TORRENT_ASIO_DEBUGGING complete_async("http_connection::on_write"); #endif + + if (e == asio::error::operation_aborted) return; + if (e) { boost::shared_ptr me(shared_from_this()); @@ -742,6 +745,8 @@ void http_connection::on_read(error_code const& e TORRENT_ASSERT(m_download_quota >= 0); } + if (e == asio::error::operation_aborted) return; + // keep ourselves alive even if the callback function // deletes this object boost::shared_ptr me(shared_from_this());