mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-12 20:43:02 +00:00
delay stop_pending until the end of stop
avoids stop_pending being False while there's still one yield to go
This commit is contained in:
@@ -393,10 +393,13 @@ class User(HasTraits):
|
|||||||
self.db.delete(orm_token)
|
self.db.delete(orm_token)
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
finally:
|
finally:
|
||||||
self.stop_pending = False
|
|
||||||
# trigger post-spawner hook on authenticator
|
# trigger post-spawner hook on authenticator
|
||||||
auth = spawner.authenticator
|
auth = spawner.authenticator
|
||||||
if auth:
|
try:
|
||||||
yield gen.maybe_future(
|
if auth:
|
||||||
auth.post_spawn_stop(self, spawner)
|
yield gen.maybe_future(
|
||||||
)
|
auth.post_spawn_stop(self, spawner)
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
self.log.exception("Error in Authenticator.post_spawn_stop for %s", self)
|
||||||
|
self.stop_pending = False
|
||||||
|
Reference in New Issue
Block a user