diff --git a/boost/network/protocol/http/server/async_connection.hpp b/boost/network/protocol/http/server/async_connection.hpp index 9d3b46aa6..377ec5738 100644 --- a/boost/network/protocol/http/server/async_connection.hpp +++ b/boost/network/protocol/http/server/async_connection.hpp @@ -148,8 +148,7 @@ namespace boost { namespace network { namespace http { ~async_connection() throw () { boost::system::error_code ignored; - socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored); - socket_.close(ignored); + socket_.shutdown(asio::ip::tcp::socket::shutdown_receive, ignored); } /** Function: template set_headers(Range headers) diff --git a/boost/network/protocol/http/server/sync_connection.hpp b/boost/network/protocol/http/server/sync_connection.hpp index 86154369d..32d562b93 100644 --- a/boost/network/protocol/http/server/sync_connection.hpp +++ b/boost/network/protocol/http/server/sync_connection.hpp @@ -247,8 +247,7 @@ namespace boost { namespace network { namespace http { if (!ec) { using boost::asio::ip::tcp; boost::system::error_code ignored_ec; - socket_.shutdown(tcp::socket::shutdown_both, ignored_ec); - socket_.close(ignored_ec); + socket_.shutdown(tcp::socket::shutdown_receive, ignored_ec); } }