Skip to content

Commit

Permalink
[AddressResolver] Add a check in shutdown to avoid some crashes if so…
Browse files Browse the repository at this point in the history
…meone calls it multiple times
  • Loading branch information
vivien-apple committed Sep 27, 2024
1 parent bb9363d commit 1f75d42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/address_resolve/AddressResolve_DefaultImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ CHIP_ERROR Resolver::Init(System::Layer * systemLayer)

void Resolver::Shutdown()
{
VerifyOrReturn(mSystemLayer != nullptr);

while (mActiveLookups.begin() != mActiveLookups.end())
{
auto current = mActiveLookups.begin();
Expand Down

0 comments on commit 1f75d42

Please sign in to comment.