Browse Source

[webserver] use cancel instead shutdown for acceptor

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1732/head
R4SAS 3 years ago
parent
commit
6bf0fdd344
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 4
      daemon/HTTPServer.cpp

4
daemon/HTTPServer.cpp

@ -1393,9 +1393,9 @@ namespace http { @@ -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 ();

Loading…
Cancel
Save