<rdar://problem/7022715> SHARED: Bonjour servers in Finder disappear and never return
[people/sha0/mDNSResponder.git] / mDNSShared / uds_daemon.c
index 9d94969..7ff467b 100644 (file)
@@ -3615,7 +3615,8 @@ mDNSexport mDNSs32 udsserver_idle(mDNSs32 nextevent)
                        {
                        if (nextevent - now > mDNSPlatformOneSecond) nextevent = now + mDNSPlatformOneSecond;
 
-                       if (!r->time_blocked) r->time_blocked = NonZeroTime(now);
+                       if (mDNSStorage.SleepState != SleepState_Awake) r->time_blocked = 0;
+                       else if (!r->time_blocked) r->time_blocked = NonZeroTime(now);
                        else if (now - r->time_blocked >= 10 * mDNSPlatformOneSecond * (r->unresponsiveness_reports+1))
                                {
                                int num = 0;