mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 16:03:00 +00:00
return http response from wait_for_http_server
This commit is contained in:
@@ -89,13 +89,13 @@ def wait_for_http_server(url, timeout=10):
|
||||
yield gen.sleep(0.1)
|
||||
else:
|
||||
app_log.debug("Server at %s responded with %s", url, e.code)
|
||||
return
|
||||
return e.response
|
||||
except (OSError, socket.error) as e:
|
||||
if e.errno not in {errno.ECONNABORTED, errno.ECONNREFUSED, errno.ECONNRESET}:
|
||||
app_log.warning("Failed to connect to %s (%s)", url, e)
|
||||
yield gen.sleep(0.1)
|
||||
else:
|
||||
return
|
||||
return r
|
||||
|
||||
raise TimeoutError(
|
||||
"Server at {url} didn't respond in {timeout} seconds".format(**locals())
|
||||
|
Reference in New Issue
Block a user