diff --git a/jupyterhub/proxy.py b/jupyterhub/proxy.py index 2e719997..94357e33 100644 --- a/jupyterhub/proxy.py +++ b/jupyterhub/proxy.py @@ -311,7 +311,10 @@ class Proxy(LoggingConfigurable): spec, route['target'], spawner.server, ) futures.append(self.add_user(user, name)) - elif spawner._spawn_pending: + elif spawner.pending: + # don't consider routes stale if the spawner is in any pending event + # wait until after the pending state clears before taking any actions + # they could be pending deletion from the proxy! good_routes.add(spawner.proxy_spec) # check service routes