Re: Network and DarkWake
Re: Network and DarkWake
- Subject: Re: Network and DarkWake
- From: Greg Parker <email@hidden>
- Date: Mon, 03 Sep 2012 14:10:02 -0700
On Sep 2, 2012, at 7:31 AM, Gerriet M. Denkmann <email@hidden> wrote:
> On 2 Sep 2012, at 20:46, Matt Patenaude <email@hidden> wrote:
>
>> Are you using it in the asynchronous callback style, or the synchronous GetFlags function?
>
> I am using:
> SCNetworkReachabilitySetCallback()
> SCNetworkReachabilityScheduleWithRunLoop()
>
> Typical case:
> 2012-09-02 20:59:33.540 +0700 DidWakeNotification
> 2012-09-02 20:59:33.611 Error getaddrinfo(time.euro.apple.com, ntp) -> nodename nor servname provided, or not known
> 2012-09-02 20:59:37.354 lost internet connection
> 2012-09-02 20:59:37.375 new internet connection
> 2012-09-02 20:59:37.391 try again - now everything is ok
>
> Seems like it just takes some time after wake (DarkWake or normal wake) for things to get sorted out.
One option would be to try the network during the DidWake notification, and if that fails then try again when the Reachability notification arrives. That should be more reliable and efficient than sleep/retry.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden