diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 44c30043dc4a5c..b9994f54ff7227 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -179,9 +179,6 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) deviceInfoprovider->SetStorageDelegate(mDeviceStorage); } - // This initializes clusters, so should come after lower level initialization. - InitDataModelHandler(&mExchangeMgr); - // Init transport before operations with secure session mgr. err = mTransports.Init(UdpListenParameters(DeviceLayer::UDPEndPointManager()) .SetAddressType(IPAddressType::kIPv6) @@ -247,6 +244,9 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) } #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT + // This initializes clusters, so should come after lower level initialization. + InitDataModelHandler(&mExchangeMgr); + #if defined(CHIP_APP_USE_ECHO) err = InitEchoHandler(&mExchangeMgr); SuccessOrExit(err);