Skip to content

Commit 19b932b

Browse files
committed
fixed shutdown call for sync and async connections
removed close call - socket will be closed automatically whet out of scoup
1 parent 7f02e43 commit 19b932b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

boost/network/protocol/http/server/async_connection.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ namespace boost { namespace network { namespace http {
148148

149149
~async_connection() throw () {
150150
boost::system::error_code ignored;
151-
socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored);
152-
socket_.close(ignored);
151+
socket_.shutdown(asio::ip::tcp::socket::shutdown_receive, ignored);
153152
}
154153

155154
/** Function: template <class Range> set_headers(Range headers)

boost/network/protocol/http/server/sync_connection.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ namespace boost { namespace network { namespace http {
247247
if (!ec) {
248248
using boost::asio::ip::tcp;
249249
boost::system::error_code ignored_ec;
250-
socket_.shutdown(tcp::socket::shutdown_both, ignored_ec);
251-
socket_.close(ignored_ec);
250+
socket_.shutdown(tcp::socket::shutdown_receive, ignored_ec);
252251
}
253252
}
254253

0 commit comments

Comments
 (0)