mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
shielded some tasks
This commit is contained in:
@@ -170,10 +170,11 @@ class KvmdClientWs:
|
||||
if writer_task:
|
||||
writer_task.cancel()
|
||||
try:
|
||||
await self.__ws.close()
|
||||
await asyncio.shield(self.__ws.close())
|
||||
except Exception:
|
||||
pass
|
||||
self.__communicated = False
|
||||
finally:
|
||||
self.__communicated = False
|
||||
|
||||
async def send_key_event(self, key: str, state: bool) -> None:
|
||||
await self.__writer_queue.put(("key", {"key": key, "state": state}))
|
||||
|
||||
Reference in New Issue
Block a user