From 6d3e010ae7f49b14cb1201367e5479a86d9d8e94 Mon Sep 17 00:00:00 2001 From: clemahieu Date: Tue, 31 Jan 2017 11:40:43 -0600 Subject: [PATCH] Infinite loop in acceptor handler. --- src/asio_server.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }); }