summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-07-23 04:33:13 +0300
committerMaxim Devaev <[email protected]>2021-07-23 04:33:13 +0300
commitbc73e74161f61f3d56f7395fec161febe65e93e6 (patch)
tree93e32d010b8870e6522a7ce6e7c703b01d8953e8 /kvmd/plugins
parent1ded926b02c03867aa6ae8bd5b71414ce42cc233 (diff)
fixed process waiting
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/hid/_mcu/__init__.py2
-rw-r--r--kvmd/plugins/hid/bt/__init__.py2
-rw-r--r--kvmd/plugins/hid/otg/device.py2
-rw-r--r--kvmd/plugins/ugpio/ezcoo.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/plugins/hid/_mcu/__init__.py b/kvmd/plugins/hid/_mcu/__init__.py
index 93adc493..bcca89b9 100644
--- a/kvmd/plugins/hid/_mcu/__init__.py
+++ b/kvmd/plugins/hid/_mcu/__init__.py
@@ -230,7 +230,7 @@ class BaseMcuHid(BaseHid, multiprocessing.Process): # pylint: disable=too-many-
if self.is_alive():
get_logger(0).info("Stopping HID daemon ...")
self.__stop_event.set()
- if self.exitcode is not None:
+ if self.is_alive() or self.exitcode is not None:
self.join()
# =====
diff --git a/kvmd/plugins/hid/bt/__init__.py b/kvmd/plugins/hid/bt/__init__.py
index 2e8ef422..54daba27 100644
--- a/kvmd/plugins/hid/bt/__init__.py
+++ b/kvmd/plugins/hid/bt/__init__.py
@@ -170,7 +170,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
if self.__proc.is_alive():
get_logger(0).info("Stopping HID daemon ...")
self.__stop_event.set()
- if self.__proc.exitcode is not None:
+ if self.__proc.is_alive() or self.__proc.exitcode is not None:
self.__proc.join()
# =====
diff --git a/kvmd/plugins/hid/otg/device.py b/kvmd/plugins/hid/otg/device.py
index 958f0d4d..28feece8 100644
--- a/kvmd/plugins/hid/otg/device.py
+++ b/kvmd/plugins/hid/otg/device.py
@@ -122,7 +122,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
if self.is_alive():
get_logger().info("Stopping HID-%s daemon ...", self.__name)
self.__stop_event.set()
- if self.exitcode is not None:
+ if self.is_alive() or self.exitcode is not None:
self.join()
def _queue_event(self, event: BaseEvent) -> None:
diff --git a/kvmd/plugins/ugpio/ezcoo.py b/kvmd/plugins/ugpio/ezcoo.py
index b1f33258..6a19445c 100644
--- a/kvmd/plugins/ugpio/ezcoo.py
+++ b/kvmd/plugins/ugpio/ezcoo.py
@@ -110,7 +110,7 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
if self.__proc.is_alive():
get_logger(0).info("Stopping %s daemon ...", self)
self.__stop_event.set()
- if self.__proc.exitcode is not None:
+ if self.__proc.is_alive() or self.__proc.exitcode is not None:
self.__proc.join()
async def read(self, pin: int) -> bool: