]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5189] HTTP acceptor checks for operation aborted status.
authorMarcin Siodelski <marcin@isc.org>
Fri, 21 Apr 2017 08:11:01 +0000 (10:11 +0200)
committerMarcin Siodelski <marcin@isc.org>
Fri, 21 Apr 2017 08:11:01 +0000 (10:11 +0200)
src/lib/http/connection.cc

index 4b44fa6a69b4f2590a07484a1f2e26eba909ae71..520ccce925c6bde43fdfe71e53a2b87470c93516 100644 (file)
@@ -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;
     }