diff --git a/src/asio_server.cc b/src/asio_server.cc index bd474c1b..fd1ec7dd 100644 --- a/src/asio_server.cc +++ b/src/asio_server.cc @@ -170,8 +170,9 @@ void server::start_accept(tcp::acceptor &acceptor, serve_mux &mux) { new_connection->start_read_deadline(); new_connection->start(); } + if (acceptor.is_open ()) + start_accept(acceptor, mux); - start_accept(acceptor, mux); }); }