diff --git a/src/transport/SecureSessionMgr.cpp b/src/transport/SecureSessionMgr.cpp index 1d5b569794812e..6fdb0db42a9311 100644 --- a/src/transport/SecureSessionMgr.cpp +++ b/src/transport/SecureSessionMgr.cpp @@ -500,8 +500,8 @@ void SecureSessionMgr::SecureMessageDispatch(const PacketHeader & packetHeader, void SecureSessionMgr::HandleConnectionExpired(const Transport::PeerConnectionState & state) { - NodeId peerNodeId = state.GetPeerNodeId(); - ChipLogDetail(Inet, "Marking old secure session for device 0x" ChipLogFormatX64 " as expired", ChipLogValueX64(peerNodeId)); + ChipLogDetail(Inet, "Marking old secure session for device 0x" ChipLogFormatX64 " as expired", + ChipLogValueX64(state.GetPeerNodeId())); if (mCB != nullptr) {