Skip to content

Commit

Permalink
[ESP32] Fixed server initialisation order (#20482)
Browse files Browse the repository at this point in the history
  • Loading branch information
jadhavrohit924 authored Jul 8, 2022
1 parent 2751020 commit 81b89e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 81b89e5

Please sign in to comment.