Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
nivi-apple and bzbarsky-apple authored Mar 29, 2024
1 parent d822cbd commit 5a02f62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/platform/Darwin/DnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ static void OnGetAddrInfo(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t i
InterfaceKey interfaceKey = { interfaceId, hostname, contextWithType->isSRPResolve };
CHIP_ERROR error = sdCtx->OnNewAddress(interfaceKey, address);

// If we saw an address resolved on the SRP domain, set the shouldStartSRPTimerForResolve to false.
// If we saw an address resolved on the SRP domain, we don't need to wait
// for SRP results, so don't bother with starting a timer to wait for those.
if (error == CHIP_NO_ERROR && contextWithType->isSRPResolve)
{
sdCtx->shouldStartSRPTimerForResolve = false;
Expand Down Expand Up @@ -316,6 +317,8 @@ static void OnGetAddrInfo(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t i

if (error != CHIP_NO_ERROR)
{
// If we failed to start the timer, just go ahead and report whatever information
// we have gotten so far.
sdCtx->Finalize();
return;
}
Expand Down

0 comments on commit 5a02f62

Please sign in to comment.