From fac8cfae0840fba138d98e86bcb8c5da79caa786 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Sat, 15 Apr 2023 00:25:41 -0700 Subject: [PATCH] daemon: fixed issue with session data collect transition not properly stopping config services --- daemon/core/emulator/session.py | 1 + daemon/core/nodes/base.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/daemon/core/emulator/session.py b/daemon/core/emulator/session.py index 310defb6..a33abebe 100644 --- a/daemon/core/emulator/session.py +++ b/daemon/core/emulator/session.py @@ -1082,6 +1082,7 @@ class Session: if isinstance(node, CoreNodeBase) and node.up: args = (node,) funcs.append((self.services.stop_services, args, {})) + funcs.append((node.stop_config_services, (), {})) utils.threadpool(funcs) # shutdown emane diff --git a/daemon/core/nodes/base.py b/daemon/core/nodes/base.py index f5688f5a..e59a89e4 100644 --- a/daemon/core/nodes/base.py +++ b/daemon/core/nodes/base.py @@ -506,6 +506,15 @@ class CoreNodeBase(NodeBase): for service in startup_path: service.start() + def stop_config_services(self) -> None: + """ + Stop all configuration services. + + :return: nothing + """ + for service in self.config_services.values(): + service.stop() + def makenodedir(self) -> None: """ Create the node directory.