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

Commit79f6727

Browse files
committed
Fixes#172 -- do not stop accepting connections for whatever reason.
1 parentbb97e54 commit79f6727

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

‎boost/network/protocol/http/server/async_server.hpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,21 @@ namespace boost { namespace network { namespace http {
9090
scoped_mutex_lockstopping_lock(stopping_mutex_);
9191
if (stopping)return;// we dont want to add another handler instance, and we dont want to know about errors for a socket we dont need anymore
9292
}
93-
if (!ec) {
94-
socket_options_base::socket_options(new_connection->socket());
95-
new_connection->start();
96-
new_connection.reset(
97-
newconnection(service_, handler, *thread_pool));
98-
acceptor.async_accept(
99-
new_connection->socket(),
100-
boost::bind(
101-
&async_server_base<Tag,Handler>::handle_accept,
102-
this,
103-
boost::asio::placeholders::error));
104-
}else {
105-
BOOST_NETWORK_MESSAGE("Error accepting connection, reason:" << ec);
93+
94+
if (ec) {
95+
BOOST_NETWORK_MESSAGE("Error accepting connection, reason:"
96+
<< ec);
10697
}
98+
99+
socket_options_base::socket_options(new_connection->socket());
100+
new_connection->start();
101+
new_connection.reset(
102+
newconnection(service_, handler, *thread_pool));
103+
acceptor.async_accept(
104+
new_connection->socket(),
105+
boost::bind(&async_server_base<Tag, Handler>::handle_accept,
106+
this,
107+
boost::asio::placeholders::error));
107108
}
108109

109110
voidstart_listening() {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp