CASEServer: Register UMH for Sigma1 only on server startup (#28064)
diff --git a/src/protocols/secure_channel/CASEServer.cpp b/src/protocols/secure_channel/CASEServer.cpp
index 082be87..b78f5f4 100644
--- a/src/protocols/secure_channel/CASEServer.cpp
+++ b/src/protocols/secure_channel/CASEServer.cpp
@@ -48,6 +48,9 @@
// Set up the group state provider that persists across all handshakes.
GetSession().SetGroupDataProvider(mGroupDataProvider);
+ ChipLogProgress(Inet, "CASE Server enabling CASE session setups");
+ mExchangeManager->RegisterUnsolicitedMessageHandlerForType(Protocols::SecureChannel::MsgType::CASE_Sigma1, this);
+
PrepareForSessionEstablishment();
return CHIP_NO_ERROR;
@@ -113,11 +116,6 @@
void CASEServer::PrepareForSessionEstablishment(const ScopedNodeId & previouslyEstablishedPeer)
{
- // Let's re-register for CASE Sigma1 message, so that the next CASE session setup request can be processed.
- // https://github.com/project-chip/connectedhomeip/issues/8342
- ChipLogProgress(Inet, "CASE Server enabling CASE session setups");
- mExchangeManager->RegisterUnsolicitedMessageHandlerForType(Protocols::SecureChannel::MsgType::CASE_Sigma1, this);
-
GetSession().Clear();
//