title: AFNetworking detect when wifi connection without active internet connection
body: <p>I'm using <code>AFNetworking</code> and was wondering how to detect a scenario when user is connected to a wifi network without active internet connection.</p>
  
  <p>I reproduce this scenario buy powering a router without connecting the dsl line.</p>
  
  <pre><code>AFNetworking return  AFNetworkReachabilityStatusReachableViaWiFi = 2
  </code></pre>
  
  <p>my code:</p>
  
  <pre><code> [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
          NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status));
          self.isInternetAvialable = status &gt; 0;
      }];
  </code></pre>
  
  <p>thanks</p>
  
  <p>I refacotred the code to be like</p>
  
  <pre><code>  AFNetworkReachabilityManager* manager = [AFNetworkReachabilityManager managerForDomain:@"http://www.google.com"];
          [manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
              NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status));
              self.isInternetAvialable = status &gt; 0;
          }];
          [manager startMonitoring];
  </code></pre>
  
  <p>now the block never get called!</p>