Skip to content

Commit

Permalink
[chip-tool] Properly shutdown all opened commissioners (#20727)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Aug 7, 2023
1 parent 77aa79c commit 1387672
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
Expand Up @@ -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();
Expand Down

0 comments on commit 1387672

Please sign in to comment.