mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-12 20:43:02 +00:00
add User.proxy_pending
flag for waiting for the proxy to be updated avoids User.running being True when the user's server has not yet been added to the proxy, causing potential redirect loops.
This commit is contained in:
@@ -110,6 +110,7 @@ class User(HasTraits):
|
||||
spawner = None
|
||||
spawn_pending = False
|
||||
stop_pending = False
|
||||
proxy_pending = False
|
||||
waiting_for_response = False
|
||||
|
||||
@property
|
||||
@@ -158,8 +159,8 @@ class User(HasTraits):
|
||||
|
||||
@property # FIX-ME CHECK IF STILL NEEDED
|
||||
def running(self):
|
||||
"""property for whether a user has a running server"""
|
||||
if self.spawn_pending or self.stop_pending:
|
||||
"""property for whether a user has a fully running, accessible server"""
|
||||
if self.spawn_pending or self.stop_pending or self.proxy_pending:
|
||||
return False # server is not running if spawn or stop is still pending
|
||||
if self.server is None:
|
||||
return False
|
||||
|
Reference in New Issue
Block a user