Skip to content

Commit

Permalink
Update src/platform/tests/TestDnssd.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
arkq and bzbarsky-apple authored Apr 26, 2023
1 parent c60cab3 commit 149863d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/platform/tests/TestDnssd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ static void HandleResolve(void * context, DnssdService * result, const chip::Spa
if (ctx->mBrowsedServicesCount == ++ctx->mResolvedServicesCount)
{
chip::DeviceLayer::SystemLayer().CancelTimer(Timeout, context);
// StopEventLoopTask needs to be called from inside the Matter event loop, but we
// might not be in there right now; instead we might be on some other thread, but
// holding the Matter lock.
chip::DeviceLayer::SystemLayer().ScheduleLambda([]() {
// After last service is resolved, stop the event loop,
// so the test case can gracefully exit.
Expand Down

0 comments on commit 149863d

Please sign in to comment.