daemon: properly go through the data collect state for grpc session shutdown, also check and avoid repeating data collect or shutdown when already past those states

This commit is contained in:
Blake Harnden 2020-12-05 09:01:53 -08:00
parent b762fe664b
commit a23ef7d603
4 changed files with 19 additions and 7 deletions

View file

@ -315,6 +315,7 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
"""
logging.debug("stop session: %s", request)
session = self.get_session(request.session_id, context)
session.data_collect()
session.shutdown()
return core_pb2.StopSessionResponse(result=True)