Skip to content

Commit

Permalink
Update src/platform/Darwin/DnssdImpl.cpp
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 Apr 11, 2024
1 parent ffc1f9f commit 4b9e59b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/platform/Darwin/DnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ static void OnGetAddrInfo(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t i

if (flags & kDNSServiceFlagsMoreComing)
{
// If we have a timer running and we have resolved on the SRP domain but the kDNSServiceFlagsMoreComing
// is set, we need to cancel the timer so we don't pre-emptively call finalize().
// If we now don't need to have a timer while we wait for SRP results, ensure that there is no such
// timer running. Otherwise the timer could fire before we get the rest of the results that flags
// say are coming, and trigger a finalize before we have all the data that is already available.
if (sdCtx->isSRPTimerRunning && !sdCtx->shouldStartSRPTimerForResolve)
{
sdCtx->CancelSRPTimer();
Expand Down

0 comments on commit 4b9e59b

Please sign in to comment.