removed session from manager after from server fixes issue in gui with red shutdown box not being removed

This commit is contained in:
Blake J. Harnden 2017-07-13 10:10:54 -07:00
parent ad179438c6
commit 45a11f7586

View file

@ -228,13 +228,13 @@ class Session(object):
if not preserve: if not preserve:
shutil.rmtree(self.session_dir, ignore_errors=True) shutil.rmtree(self.session_dir, ignore_errors=True)
# remove this session from the manager
SessionManager.remove(self)
# call session shutdown handlers # call session shutdown handlers
for handler in self.shutdown_handlers: for handler in self.shutdown_handlers:
handler(self) handler(self)
# remove this session from the manager
SessionManager.remove(self)
def broadcast_event(self, event_data): def broadcast_event(self, event_data):
""" """
Handle event data that should be provided to event handler. Handle event data that should be provided to event handler.
@ -912,6 +912,7 @@ class Session(object):
# TODO: do we really want a check that finds 0 nodes to initiate a shutdown state? # TODO: do we really want a check that finds 0 nodes to initiate a shutdown state?
if node_count == 0: if node_count == 0:
self.set_state(state=EventTypes.SHUTDOWN_STATE.value, send_event=True) self.set_state(state=EventTypes.SHUTDOWN_STATE.value, send_event=True)
# TODO: this seems redundant as it occurs during shutdown as well
self.sdt.shutdown() self.sdt.shutdown()
def short_session_id(self): def short_session_id(self):