You might consider using SCNetworkReachability to monitor when the availability of time.apple.com changes.
https://developer.apple.com/library/mac/#documentation/SystemConfiguration/Reference/SCNetworkReachabilityRef/Reference/reference.html -Matt On Sep 2, 2012, at 1:23 AM, "Gerriet M. Denkmann" <gerr...@mdenkmann.de> wrote: > > On 31 Aug 2012, at 23:57, Marco S Hyman <m...@snafu.org> wrote: > >> On Aug 31, 2012, at 6:04 AM, Gerriet M. Denkmann <gerr...@mdenkmann.de> >> wrote: >> >>> But often (not always) my app (while in DarkWake) gets: >>> Error getaddrinfo(time.apple.com, ntp) -> nodename nor servname provided, >>> or not known >> >> I believe its a race condition. NTP is trying to access the network >> before it is fully re-initialized. I'll see this (or similar network >> races) when waking my iMac up. I don't believe it has anything to >> do with DarkWake, specifically. > > You are probably right. > > I changed my app so that if getaddrinfo() does not succeed, it waits 10 > seconds, then tries again. > This seems to have fixed the problem. > > Thanks for your suggestion! > > Kind regards, > > Gerriet. > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/matt%40mattpatenaude.com > > This email sent to m...@mattpatenaude.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com