From 19b932b4f54290df7c46efc8b8fb3f3bdaf78f7b Mon Sep 17 00:00:00 2001 From: Nick Migel Date: Sat, 7 May 2011 00:50:30 +0200 Subject: [PATCH] fixed shutdown call for sync and async connections removed close call - socket will be closed automatically whet out of scoup --- boost/network/protocol/http/server/async_connection.hpp | 3 +-- boost/network/protocol/http/server/sync_connection.hpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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); } }