From 128e494134a77cfd54752a09de190c47b49f0035 Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 27 Jan 2021 21:03:19 +1030 Subject: [PATCH] Stop uBridge if VPCS node has been terminated. Ref https://github.com/GNS3/gns3-gui/issues/3110 --- gns3server/compute/vpcs/vpcs_vm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gns3server/compute/vpcs/vpcs_vm.py b/gns3server/compute/vpcs/vpcs_vm.py index 80eb8d5b..382ad932 100644 --- a/gns3server/compute/vpcs/vpcs_vm.py +++ b/gns3server/compute/vpcs/vpcs_vm.py @@ -251,7 +251,7 @@ class VPCSVM(BaseNode): log.error("Could not start VPCS {}: {}\n{}".format(self._vpcs_path(), e, vpcs_stdout)) raise VPCSError("Could not start VPCS {}: {}\n{}".format(self._vpcs_path(), e, vpcs_stdout)) - def _termination_callback(self, returncode): + async def _termination_callback(self, returncode): """ Called when the process has stopped. @@ -260,6 +260,7 @@ class VPCSVM(BaseNode): if self._started: log.info("VPCS process has stopped, return code: %d", returncode) + await self._stop_ubridge() self._started = False self.status = "stopped" self._process = None