diff options
author | Maxim Devaev <[email protected]> | 2021-07-23 04:33:13 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2021-07-23 04:33:13 +0300 |
commit | bc73e74161f61f3d56f7395fec161febe65e93e6 (patch) | |
tree | 93e32d010b8870e6522a7ce6e7c703b01d8953e8 /kvmd/plugins/hid | |
parent | 1ded926b02c03867aa6ae8bd5b71414ce42cc233 (diff) |
fixed process waiting
Diffstat (limited to 'kvmd/plugins/hid')
-rw-r--r-- | kvmd/plugins/hid/_mcu/__init__.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/hid/bt/__init__.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/hid/otg/device.py | 2 |
3 files changed, 3 insertions, 3 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: |