mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-12 12:33: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.commit()
|
||||
finally:
|
||||
self.stop_pending = False
|
||||
# trigger post-spawner hook on authenticator
|
||||
auth = spawner.authenticator
|
||||
if auth:
|
||||
yield gen.maybe_future(
|
||||
auth.post_spawn_stop(self, spawner)
|
||||
)
|
||||
try:
|
||||
if auth:
|
||||
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