Skip to content

Commit

Permalink
[server] Revert shutdown protection.
Browse files Browse the repository at this point in the history
  • Loading branch information
turon committed Jan 7, 2022
1 parent 1c9fc33 commit 2f82dec
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint
&mSessions, &mFabrics, &mSessionIDAllocator);
SuccessOrExit(err);

err = mCASESessionManager.Init();
mState = ServerState::Enabled;
err = mCASESessionManager.Init();

exit:
if (err != CHIP_NO_ERROR)
Expand All @@ -250,18 +249,13 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint

void Server::Shutdown()
{
if (mState == ServerState::Disabled)
return;

chip::Dnssd::ServiceAdvertiser::Instance().Shutdown();
chip::app::InteractionModelEngine::GetInstance()->Shutdown();
mExchangeMgr.Shutdown();
mSessions.Shutdown();
mTransports.Close();
mCommissioningWindowManager.Shutdown();
chip::Platform::MemoryShutdown();

mState = ServerState::Disabled;
}

#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT
Expand Down

0 comments on commit 2f82dec

Please sign in to comment.