From 6bf0fdd3448b0c65a38abf7e3c414c5c563f94cb Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 18 Feb 2022 09:45:35 +0300 Subject: [PATCH] [webserver] use cancel instead shutdown for acceptor Signed-off-by: R4SAS --- daemon/HTTPServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index fe2e7156..419c1588 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -1393,9 +1393,9 @@ namespace http { m_IsRunning = false; boost::system::error_code ec; - m_Acceptor.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec); + m_Acceptor.cancel(ec); if (ec) - LogPrint (eLogDebug, "HTTPServer: Couldn't shutdown acceptor: ", ec.message ()); + LogPrint (eLogDebug, "HTTPServer: Error while cancelling operations on acceptor: ", ec.message ()); m_Acceptor.close(); m_Service.stop ();