<rdar://problem/7022715> SHARED: Bonjour servers in Finder disappear and never return
authorcheshire@apple.com <cheshire@apple.com@214c2c4a-bf3b-4dcf-9390-e4dd3010487d>
Thu, 13 Aug 2009 21:28:36 +0000 (21:28 +0000)
committercheshire@apple.com <cheshire@apple.com@214c2c4a-bf3b-4dcf-9390-e4dd3010487d>
Thu, 13 Aug 2009 21:28:36 +0000 (21:28 +0000)
Fixed case where mDNSResponder could overzealously abort client connections immediately after wake from sleep

git-svn-id: http://svn.macosforge.org/repository/mdnsresponder/trunk@6603 214c2c4a-bf3b-4dcf-9390-e4dd3010487d

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;