Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chip-tool] Properly shutdown all opened commissioners
Browse files Browse the repository at this point in the history
vivien-apple committed Jul 14, 2022
1 parent 0898b30 commit 9b5e142
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions examples/chip-tool/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
@@ -165,16 +165,9 @@ void CHIPCommand::MaybeTearDownStack()
// since the CHIP thread and event queue have been stopped, preventing any thread
// races.
//
ShutdownCommissioner(kIdentityNull);
ShutdownCommissioner(kIdentityAlpha);
ShutdownCommissioner(kIdentityBeta);
ShutdownCommissioner(kIdentityGamma);

std::string name = GetIdentity();
chip::FabricId fabricId = strtoull(name.c_str(), nullptr, 0);
if (fabricId >= kIdentityOtherFabricId)
for (auto it = mCommissioners.begin(); it != mCommissioners.end(); it++)
{
ShutdownCommissioner(name);
ShutdownCommissioner(it->first);
}

StopTracing();

0 comments on commit 9b5e142

Please sign in to comment.