Created attachment 11068 [details]
NetworkReachability.TryGetFlags hangs when the network packet loss is 100%.
**Steps to Reproduce:**
1. Use the Network Link Conditioner to cause 100% packet loss (if you need that, http://nshipster.com/network-link-conditioner/)
2. Run the attached sample on an iOS Simulator
It will hang when launching because of the IsHostReachable call of the Reachability.cs class
No hang, and it should return false.
**Build Date & Platform:**
The code being used for the Reachability sample is
public static bool IsHostReachable(string host)
using (var r = new NetworkReachability(host))
if (r.TryGetFlags(out flags)) // Hangs here
The call to `SCNetworkReachabilityGetFlags` takes a few seconds but it does get back and shows
2015-05-07 16:52:00.281 ReachabilityTest[90947:19574570] false
hmm... maybe it took more time than the simulator watchdog allowed ?
@John could you reproduce it ? is so where the call stack if you hit pause ? or does it eventually quit (watchdog) ?
Having undefined time functions calls in FinishedLaunching is a common issue  that can bite you back - generally seen on device (but there's now a watchdog on the simulator too).
I'm experiencing a similar issue. My app starts several image downloads. Before they are all finished, I use Network Link Conditioner to manipulate my connection so that all packets are lost. The requests that are still in progress never return.
I moved the code to the ViewDidLoad and it does not hang. Instead, IsHostReachable returns true, even with 100% packet loss - which seems wrong as the host is not reachable.
I also have IsHostReachable returns true when I set the "Settings -> Developer -> Status -> 100% loss".
Has anyone managed to confirm whether this is a defect yet?
I am experiencing exactly the same issue, inside Xamarin CrossConnectivity plugin. On iPhone 4 device it takes about 30 seconds, iOS 8 simulator about 20-30s, iOS 9 simulator about 5s. If called in FinishedLaunching, app crashes because of watchdog.
we will check if it is a bug on our side or apple is not giving us the right values
I can confirm using the latest Xamarin.iOS 10.12.0.14, the app no longer hangs but `IsHostReachable` returns `true`, even with 100% packet loss
Marking this report as CONFIRMED.