Skip to content

Instantly share code, notes, and snippets.

@Geri-Borbas
Created June 17, 2013 09:39
Show Gist options
  • Save Geri-Borbas/5795791 to your computer and use it in GitHub Desktop.
Save Geri-Borbas/5795791 to your computer and use it in GitHub Desktop.
IP address SCNetworkReachability workaround.
if (isAddressReachability)
{
dispatch_async(dispatch_queue_create("com.eppz.reachability.workaround", NULL), ^
{
SCNetworkReachabilityFlags flags;
if (SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags))
{
//'Manual' invocation of callback functionality.
dispatch_async(dispatch_get_main_queue(), ^ //Dispatch delegate callback on the main thread.
{
[self parseFlags:flags];
[self.delegate reachabilityChanged:self];
});
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment