diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 4df9300..a1a7045 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -84,7 +84,7 @@
 
     ~Connection()
     {
-        res.completeRequestHandler = nullptr;
+        res.setCompleteRequestHandler(nullptr);
         cancelDeadlineTimer();
 #ifdef BMCWEB_ENABLE_DEBUG
         connectionCount--;
@@ -337,7 +337,7 @@
 
         if (!isInvalidRequest)
         {
-            res.completeRequestHandler = [] {};
+            res.setCompleteRequestHandler(nullptr);
             res.isAliveHelper = [this]() -> bool { return isAlive(); };
 
             req->ioService = static_cast<decltype(req->ioService)>(
@@ -346,10 +346,10 @@
             if (!res.completed)
             {
                 needToCallAfterHandlers = true;
-                res.completeRequestHandler = [self(shared_from_this())] {
+                res.setCompleteRequestHandler([self(shared_from_this())] {
                     boost::asio::post(self->adaptor.get_executor(),
                                       [self] { self->completeRequest(); });
-                };
+                });
                 if (req->isUpgrade() &&
                     boost::iequals(
                         req->getHeaderValue(boost::beast::http::field::upgrade),
@@ -358,7 +358,7 @@
                     handler->handleUpgrade(*req, res, std::move(adaptor));
                     // delete lambda with self shared_ptr
                     // to enable connection destruction
-                    res.completeRequestHandler = nullptr;
+                    res.setCompleteRequestHandler(nullptr);
                     return;
                 }
                 auto asyncResp = std::make_shared<bmcweb::AsyncResp>(res);
@@ -432,7 +432,7 @@
 
             // delete lambda with self shared_ptr
             // to enable connection destruction
-            res.completeRequestHandler = nullptr;
+            res.setCompleteRequestHandler(nullptr);
             return;
         }
         if (res.body().empty() && !res.jsonValue.empty())
@@ -472,7 +472,7 @@
 
         // delete lambda with self shared_ptr
         // to enable connection destruction
-        res.completeRequestHandler = nullptr;
+        res.setCompleteRequestHandler(nullptr);
     }
 
     void readClientIp()
diff --git a/http/http_response.hpp b/http/http_response.hpp
index 72ff9e9..a983d4a 100644
--- a/http/http_response.hpp
+++ b/http/http_response.hpp
@@ -136,6 +136,11 @@
         return isAliveHelper && isAliveHelper();
     }
 
+    void setCompleteRequestHandler(std::function<void()> newHandler)
+    {
+        completeRequestHandler = std::move(newHandler);
+    }
+
   private:
     bool completed{};
     std::function<void()> completeRequestHandler;
