title: access reachability with enough time to return true state
body: <p>i have a reachability class which is checked from within my VC code as below:</p>
  
  <pre><code>func setupReachability (hostName:String?, useClosures: Bool) {
  
      let reachability = hostName == nil ? Reachability() : Reachability(hostname: hostName!)
      self.reachability = reachability
      try! self.reachability?.startNotifier()
  
      if useClosures {
          reachability?.whenReachable = { reachability in
              DispatchQueue.main.async {
                  self.connected = true
                  print("Reachable....")
              }
          }
          reachability?.whenUnreachable = { reachability in
              DispatchQueue.main.async {
                  self.connected = false
                  print("Not Connected....")
              }
          }
  
      } else {
          NotificationCenter.default.addObserver(self, selector: Selector(("reachabilityChanged:")), name: ReachabilityChangedNotification, object: reachability)
      }
  }
  </code></pre>
  
  <p>this is initialised from within viewDidLoad:</p>
  
  <pre><code>    setupReachability(hostName: nil, useClosures: true)
      print(self.connected)
  </code></pre>
  
  <p>the problem i am having is that it always returns false and i need this to load with enough time that it returns true (if it is really connected) at this point.  I'm struggling to figure out where to place my setupReachability function and initialise it so that it can be accessed from anywhere in the app and return its connected state.  Ive tried placing this in a separate class but can't seem to get it working or access the connected state.  Any tips on how to achieve this?</p>