From: Marcin Siodelski Date: Fri, 21 Apr 2017 08:11:01 +0000 (+0200) Subject: [5189] HTTP acceptor checks for operation aborted status. X-Git-Tag: trac5243_base~4^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dcecbde0ddfda6e29c7342a339f95f7477959cf7;p=thirdparty%2Fkea.git [5189] HTTP acceptor checks for operation aborted status. --- diff --git a/src/lib/http/connection.cc b/src/lib/http/connection.cc index 4b44fa6a69..520ccce925 100644 --- a/src/lib/http/connection.cc +++ b/src/lib/http/connection.cc @@ -118,6 +118,12 @@ HttpConnection::asyncSendResponse(const ConstHttpResponsePtr& response) { void HttpConnection::acceptorCallback(const boost::system::error_code& ec) { + // Operation is aborted when the acceptor is cancelled, as a result + // of stopping the connection. This is not an error condition. + if (ec.value() == boost::asio::error::operation_aborted) { + return; + } + if (!acceptor_.isOpen()) { return; }