@@ -90,20 +90,21 @@ namespace boost { namespace network { namespace http {
9090 scoped_mutex_lockstopping_lock (stopping_mutex_);
9191if (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- 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);
10697 }
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));
107108 }
108109
109110void start_listening () {