mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-13 01:30:31 +08:00
minor otg hid fixes
This commit is contained in:
parent
7d6d6fa6f9
commit
e1b7e4fbcd
@ -88,7 +88,7 @@ class DeviceProcess(multiprocessing.Process): # pylint: disable=too-many-instan
|
|||||||
self._process_event(event)
|
self._process_event(event)
|
||||||
passed = 0
|
passed = 0
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.error("Unexpected HID-%s error", self.__name)
|
logger.exception("Unexpected HID-%s error", self.__name)
|
||||||
self._close_device()
|
self._close_device()
|
||||||
finally:
|
finally:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
@ -96,7 +96,7 @@ class DeviceProcess(multiprocessing.Process): # pylint: disable=too-many-instan
|
|||||||
self._close_device()
|
self._close_device()
|
||||||
|
|
||||||
def is_online(self) -> bool:
|
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:
|
def _stop(self) -> None:
|
||||||
if self.is_alive():
|
if self.is_alive():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user