daemon: avoid shutting down sessions already in shutdown state, due to exit hooks potentially duplicating effort
This commit is contained in:
parent
8ca52bf475
commit
ee59d6bf8b
1 changed files with 3 additions and 1 deletions
|
@ -763,7 +763,9 @@ class Session:
|
|||
"""
|
||||
Shutdown all session nodes and remove the session directory.
|
||||
"""
|
||||
logging.info("session(%s) shutting down", self.id)
|
||||
if self.state == EventTypes.SHUTDOWN_STATE:
|
||||
return
|
||||
logging.info("session(%s) state(%s) shutting down", self.id, self.state)
|
||||
self.set_state(EventTypes.DATACOLLECT_STATE, send_event=True)
|
||||
self.set_state(EventTypes.SHUTDOWN_STATE, send_event=True)
|
||||
|
||||
|
|
Loading…
Reference in a new issue