diff --git a/command/channel_auth.cpp b/command/channel_auth.cpp
index f719452..ee19a3b 100644
--- a/command/channel_auth.cpp
+++ b/command/channel_auth.cpp
@@ -10,7 +10,7 @@
 
 std::vector<uint8_t>
     GetChannelCapabilities(const std::vector<uint8_t>& inPayload,
-                           const message::Handler& handler)
+                           std::shared_ptr<message::Handler>& handler)
 {
     auto request =
         reinterpret_cast<const GetChannelCapabilitiesReq*>(inPayload.data());
diff --git a/command/channel_auth.hpp b/command/channel_auth.hpp
index 9f2abe1..b78fdb2 100644
--- a/command/channel_auth.hpp
+++ b/command/channel_auth.hpp
@@ -120,6 +120,6 @@
  */
 std::vector<uint8_t>
     GetChannelCapabilities(const std::vector<uint8_t>& inPayload,
-                           const message::Handler& handler);
+                           std::shared_ptr<message::Handler>& handler);
 
 } // namespace command
diff --git a/command/open_session.cpp b/command/open_session.cpp
index 2887d37..a7b75bf 100644
--- a/command/open_session.cpp
+++ b/command/open_session.cpp
@@ -12,7 +12,7 @@
 {
 
 std::vector<uint8_t> openSession(const std::vector<uint8_t>& inPayload,
-                                 const message::Handler& handler)
+                                 std::shared_ptr<message::Handler>& handler)
 {
     auto request =
         reinterpret_cast<const OpenSessionRequest*>(inPayload.data());
diff --git a/command/open_session.hpp b/command/open_session.hpp
index 700c784..e119dbc 100644
--- a/command/open_session.hpp
+++ b/command/open_session.hpp
@@ -175,6 +175,6 @@
  * @return Response data for the command
  */
 std::vector<uint8_t> openSession(const std::vector<uint8_t>& inPayload,
-                                 const message::Handler& handler);
+                                 std::shared_ptr<message::Handler>& handler);
 
 } // namespace command
diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
index ecb86e7..1413e6c 100644
--- a/command/payload_cmds.cpp
+++ b/command/payload_cmds.cpp
@@ -18,7 +18,7 @@
 using namespace phosphor::logging;
 
 std::vector<uint8_t> activatePayload(const std::vector<uint8_t>& inPayload,
-                                     const message::Handler& handler)
+                                     std::shared_ptr<message::Handler>& handler)
 {
     auto request =
         reinterpret_cast<const ActivatePayloadRequest*>(inPayload.data());
@@ -56,7 +56,7 @@
         return outPayload;
     }
 
-    auto session = session::Manager::get().getSession(handler.sessionID);
+    auto session = session::Manager::get().getSession(handler->sessionID);
 
     if (!request->encryption && session->isCryptAlgoEnabled())
     {
@@ -84,13 +84,13 @@
     }
 
     // Set the current command's socket channel to the session
-    handler.setChannelInSession();
+    handler->setChannelInSession();
 
     // Start the SOL payload
     try
     {
         sol::Manager::get().startPayloadInstance(request->payloadInstance,
-                                                 handler.sessionID);
+                                                 handler->sessionID);
     }
     catch (std::exception& e)
     {
@@ -109,8 +109,9 @@
     return outPayload;
 }
 
-std::vector<uint8_t> deactivatePayload(const std::vector<uint8_t>& inPayload,
-                                       const message::Handler& handler)
+std::vector<uint8_t>
+    deactivatePayload(const std::vector<uint8_t>& inPayload,
+                      std::shared_ptr<message::Handler>& handler)
 {
     auto request =
         reinterpret_cast<const DeactivatePayloadRequest*>(inPayload.data());
@@ -180,8 +181,9 @@
     return outPayload;
 }
 
-std::vector<uint8_t> getPayloadStatus(const std::vector<uint8_t>& inPayload,
-                                      const message::Handler& handler)
+std::vector<uint8_t>
+    getPayloadStatus(const std::vector<uint8_t>& inPayload,
+                     std::shared_ptr<message::Handler>& handler)
 {
     auto request =
         reinterpret_cast<const GetPayloadStatusRequest*>(inPayload.data());
@@ -214,7 +216,7 @@
 }
 
 std::vector<uint8_t> getPayloadInfo(const std::vector<uint8_t>& inPayload,
-                                    const message::Handler& handler)
+                                    std::shared_ptr<message::Handler>& handler)
 {
     auto request =
         reinterpret_cast<const GetPayloadInfoRequest*>(inPayload.data());
diff --git a/command/payload_cmds.hpp b/command/payload_cmds.hpp
index b28392b..8778786 100644
--- a/command/payload_cmds.hpp
+++ b/command/payload_cmds.hpp
@@ -109,8 +109,9 @@
  *
  *  @return Response data for the command
  */
-std::vector<uint8_t> activatePayload(const std::vector<uint8_t>& inPayload,
-                                     const message::Handler& handler);
+std::vector<uint8_t>
+    activatePayload(const std::vector<uint8_t>& inPayload,
+                    std::shared_ptr<message::Handler>& handler);
 
 constexpr uint8_t IPMI_CC_PAYLOAD_DEACTIVATED = 0x80;
 
@@ -172,8 +173,9 @@
  *
  * @return Response data for the command.
  */
-std::vector<uint8_t> deactivatePayload(const std::vector<uint8_t>& inPayload,
-                                       const message::Handler& handler);
+std::vector<uint8_t>
+    deactivatePayload(const std::vector<uint8_t>& inPayload,
+                      std::shared_ptr<message::Handler>& handler);
 
 /** @struct GetPayloadStatusRequest
  *
@@ -250,8 +252,9 @@
  *
  *  @return Response data for the command
  */
-std::vector<uint8_t> getPayloadStatus(const std::vector<uint8_t>& inPayload,
-                                      const message::Handler& handler);
+std::vector<uint8_t>
+    getPayloadStatus(const std::vector<uint8_t>& inPayload,
+                     std::shared_ptr<message::Handler>& handler);
 
 /** @struct GetPayloadInfoRequest
  *
@@ -286,7 +289,7 @@
  *  @return Response data for the command
  */
 std::vector<uint8_t> getPayloadInfo(const std::vector<uint8_t>& inPayload,
-                                    const message::Handler& handler);
+                                    std::shared_ptr<message::Handler>& handler);
 
 } // namespace command
 
diff --git a/command/rakp12.cpp b/command/rakp12.cpp
index 7d349c6..912a1d0 100644
--- a/command/rakp12.cpp
+++ b/command/rakp12.cpp
@@ -24,7 +24,7 @@
 }
 
 std::vector<uint8_t> RAKP12(const std::vector<uint8_t>& inPayload,
-                            const message::Handler& handler)
+                            std::shared_ptr<message::Handler>& handler)
 {
     auto request = reinterpret_cast<const RAKP1request*>(inPayload.data());
     // verify inPayload minimum size
diff --git a/command/rakp12.hpp b/command/rakp12.hpp
index c19853f..bf6d4c5 100644
--- a/command/rakp12.hpp
+++ b/command/rakp12.hpp
@@ -73,6 +73,6 @@
  * @return Response data for the command
  */
 std::vector<uint8_t> RAKP12(const std::vector<uint8_t>& inPayload,
-                            const message::Handler& handler);
+                            std::shared_ptr<message::Handler>& handler);
 
 } // namespace command
diff --git a/command/rakp34.cpp b/command/rakp34.cpp
index a8ad86a..59707d0 100644
--- a/command/rakp34.cpp
+++ b/command/rakp34.cpp
@@ -65,7 +65,7 @@
 }
 
 std::vector<uint8_t> RAKP34(const std::vector<uint8_t>& inPayload,
-                            const message::Handler& handler)
+                            std::shared_ptr<message::Handler>& handler)
 {
 
     std::vector<uint8_t> outPayload(sizeof(RAKP4response));
diff --git a/command/rakp34.hpp b/command/rakp34.hpp
index e582256..7b29d70 100644
--- a/command/rakp34.hpp
+++ b/command/rakp34.hpp
@@ -50,6 +50,6 @@
  * @return Response data for the command
  */
 std::vector<uint8_t> RAKP34(const std::vector<uint8_t>& inPayload,
-                            const message::Handler& handler);
+                            std::shared_ptr<message::Handler>& handler);
 
 } // namespace command
diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp
index 84c6e85..1b51612 100644
--- a/command/session_cmds.cpp
+++ b/command/session_cmds.cpp
@@ -18,7 +18,7 @@
 
 std::vector<uint8_t>
     setSessionPrivilegeLevel(const std::vector<uint8_t>& inPayload,
-                             const message::Handler& handler)
+                             std::shared_ptr<message::Handler>& handler)
 {
     auto request =
         reinterpret_cast<const SetSessionPrivLevelReq*>(inPayload.data());
@@ -34,7 +34,7 @@
     response->completionCode = IPMI_CC_OK;
     uint8_t reqPrivilegeLevel = request->reqPrivLevel;
 
-    auto session = session::Manager::get().getSession(handler.sessionID);
+    auto session = session::Manager::get().getSession(handler->sessionID);
 
     if (reqPrivilegeLevel == 0) // Just return present privilege level
     {
@@ -209,7 +209,7 @@
 }
 
 std::vector<uint8_t> closeSession(const std::vector<uint8_t>& inPayload,
-                                  const message::Handler& handler)
+                                  std::shared_ptr<message::Handler>& handler)
 {
     // minimum inPayload size is reqSessionId (uint32_t)
     // maximum inPayload size is struct CloseSessionRequest
@@ -260,7 +260,7 @@
     {
         ipmiNetworkInstance = session::Manager::get().getNetworkInstance();
         auto currentSession =
-            session::Manager::get().getSession(handler.sessionID);
+            session::Manager::get().getSession(handler->sessionID);
         currentSessionPriv = currentSession->currentPrivilege();
     }
     catch (sdbusplus::exception::SdBusError& e)
diff --git a/command/session_cmds.hpp b/command/session_cmds.hpp
index d5d394b..026b9d8 100644
--- a/command/session_cmds.hpp
+++ b/command/session_cmds.hpp
@@ -77,7 +77,7 @@
  */
 std::vector<uint8_t>
     setSessionPrivilegeLevel(const std::vector<uint8_t>& inPayload,
-                             const message::Handler& handler);
+                             std::shared_ptr<message::Handler>& handler);
 /**
  * @struct CloseSessionRequest
  *
@@ -115,6 +115,6 @@
  * @return Response data for the command
  */
 std::vector<uint8_t> closeSession(const std::vector<uint8_t>& inPayload,
-                                  const message::Handler& handler);
+                                  std::shared_ptr<message::Handler>& handler);
 
 } // namespace command
diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp
index 1253ac5..81dfc99 100644
--- a/command/sol_cmds.cpp
+++ b/command/sol_cmds.cpp
@@ -15,7 +15,7 @@
 using namespace phosphor::logging;
 
 std::vector<uint8_t> payloadHandler(const std::vector<uint8_t>& inPayload,
-                                    const message::Handler& handler)
+                                    std::shared_ptr<message::Handler>& handler)
 {
     // Check inPayload size is at least Payload
     if (inPayload.size() < sizeof(Payload))
@@ -35,7 +35,7 @@
 
     try
     {
-        auto& context = sol::Manager::get().getContext(handler.sessionID);
+        auto& context = sol::Manager::get().getContext(handler->sessionID);
 
         context.processInboundPayload(
             request->packetSeqNum, request->packetAckSeqNum,
@@ -70,7 +70,7 @@
 }
 
 std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload,
-                                   const message::Handler& handler)
+                                   std::shared_ptr<message::Handler>& handler)
 {
     std::vector<uint8_t> outPayload(sizeof(GetConfParamsResponse));
     auto request =
diff --git a/command/sol_cmds.hpp b/command/sol_cmds.hpp
index 182b73e..3e05e0f 100644
--- a/command/sol_cmds.hpp
+++ b/command/sol_cmds.hpp
@@ -22,7 +22,7 @@
  *  @return Response data for the command.
  */
 std::vector<uint8_t> payloadHandler(const std::vector<uint8_t>& inPayload,
-                                    const message::Handler& handler);
+                                    std::shared_ptr<message::Handler>& handler);
 
 constexpr uint8_t netfnTransport = 0x0C;
 constexpr uint8_t solActivatingCmd = 0x20;
@@ -185,7 +185,7 @@
  *  @return Response data for the command.
  */
 std::vector<uint8_t> setConfParams(const std::vector<uint8_t>& inPayload,
-                                   const message::Handler& handler);
+                                   std::shared_ptr<message::Handler>& handler);
 
 /** @struct GetConfParamsRequest
  *
@@ -228,7 +228,7 @@
  *  @return Response data for the command.
  */
 std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload,
-                                   const message::Handler& handler);
+                                   std::shared_ptr<message::Handler>& handler);
 
 } // namespace command
 
