Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit19b932b

Browse files
committed
fixed shutdown call for sync and async connections
removed close call - socket will be closed automatically whet out of scoup
1 parent7f02e43 commit19b932b

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)

[8]ページ先頭

©2009-2025 Movatter.jp