iPhone reachability sample not always working
<p>using iphone sdk 3.1.2 </p>

<p>I use the following code to monitor whether my app has an internet connection. I need to either get notifications or poll so my app always has the latest status.</p>

<pre><code>hostReach = [[Reachability reachabilityWithHostName: @"www.google.com"] retain];
[hostReach startNotifer];
</code></pre>

<p>then when i get a notification i use these functions to let me know the network status  </p>

<pre><code>NetworkStatus netStatus = [hostReach currentReachabilityStatus];
BOOL connectionRequired= [hostReach connectionRequired];
</code></pre>

<p>I've found that if i unplug the power cable on my Netgear Router my app correctly knows its lost  its internet connection. However when i plug the power back in, my app although it gets notifications from the Reachability callback the netStatus returned by </p>

<pre><code>[hostReach currentReachabilityStatus]
</code></pre>

<p>never is equal to ReachableByWifi which is what i want to know if the internet is available 
through the WiFI connection).</p>

<p>Even if i have a timer every 30secs to call </p>

<pre><code>[hostReach currentReachabilityStatus]
</code></pre>

<p>it still does not return ReachablebyWifi even when clearly the router is all started up and internet is definitely available. This was a worst case situation which i thought would work.</p>

<p>On another note if i only pull out the phone line connection and leave the router powered on (ie wifi signal still present0 my app does not get notified the internet connection is down.</p>

<p>How to get over these issues?</p>
