@@ -90,20 +90,21 @@ namespace boost { namespace network { namespace http {
90
90
scoped_mutex_lockstopping_lock (stopping_mutex_);
91
91
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
92
92
}
93
- if (!ec) {
94
- socket_options_base::socket_options (new_connection->socket ());
95
- new_connection->start ();
96
- new_connection.reset (
97
- new connection (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);
106
97
}
98
+
99
+ socket_options_base::socket_options (new_connection->socket ());
100
+ new_connection->start ();
101
+ new_connection.reset (
102
+ new connection (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));
107
108
}
108
109
109
110
void start_listening () {