• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Networking and sleep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Networking and sleep


  • Subject: Networking and sleep
  • From: Lorenzo Thurman <email@hidden>
  • Date: Tue, 10 Apr 2012 16:41:27 -0500

I have an app which attempts to make an internet connection after receiving an NSWorkspaceDidWake notification. Most of the time, the connection fails with the error, "...internet connection appears to be offline (-1009)". My guess is the the OS has not yet reinitialized networking before my app attempts to connect. So I added a sleepForInterval:10 to make my app wait a bit before connecting. This seems to work just fine, but question is:
Is there a more elegant way to handle this?

TIA


Lorenzo Thurman
email@hidden



_______________________________________________

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

  • Follow-Ups:
    • Re: Networking and sleep
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: A question about core data.
  • Next by Date: Re: Question about hebrew in textfields and textviews
  • Previous by thread: Re: A question about core data.
  • Next by thread: Re: Networking and sleep
  • Index(es):
    • Date
    • Thread