'Test a connection to my Hub
- exit if I can\'t connect at all
- check version and warn on sufficient mismatch'

@gen.coroutine
def check_hub_version(self):

    client = AsyncHTTPClient()
    RETRIES = 5
    for i in range(1, (RETRIES + 1)):
        try:
            resp = (yield client.fetch(self.hub_api_url))
        except Exception:
            self.log.exception('Failed    to    connect    to    my    Hub    at    %s    (attempt    %i/%i).    Is    it    running?', self.hub_api_url, i, RETRIES)
            (yield gen.sleep(min((2 ** i), 16)))
        else:
            break
    else:
        self.exit(1)
    hub_version = resp.headers.get('X-JupyterHub-Version')
    _check_version(hub_version, __version__, self.log)
