From e1b7e4fbcd1f34878162bc8bbeb92b7f47f058cc Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Mon, 30 Sep 2019 01:02:00 +0300 Subject: minor otg hid fixes --- kvmd/plugins/hid/otg/hid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvmd') diff --git a/kvmd/plugins/hid/otg/hid.py b/kvmd/plugins/hid/otg/hid.py index a90cd094..e0cf1120 100644 --- a/kvmd/plugins/hid/otg/hid.py +++ b/kvmd/plugins/hid/otg/hid.py @@ -88,7 +88,7 @@ class DeviceProcess(multiprocessing.Process): # pylint: disable=too-many-instan self._process_event(event) passed = 0 except Exception: - logger.error("Unexpected HID-%s error", self.__name) + logger.exception("Unexpected HID-%s error", self.__name) self._close_device() finally: time.sleep(1) @@ -96,7 +96,7 @@ class DeviceProcess(multiprocessing.Process): # pylint: disable=too-many-instan self._close_device() def is_online(self) -> bool: - return bool(self.__online_shared.value) + return bool(self.__online_shared.value and self.is_alive()) def _stop(self) -> None: if self.is_alive(): -- cgit v1.2.3