mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
fixed ws event CLOSED
This commit is contained in:
parent
5a1a22b27c
commit
394af7a180
@ -153,7 +153,7 @@ class KvmdClientWs:
|
|||||||
msg = receive_task.result()
|
msg = receive_task.result()
|
||||||
if msg.type == aiohttp.WSMsgType.TEXT:
|
if msg.type == aiohttp.WSMsgType.TEXT:
|
||||||
yield json.loads(msg.data)
|
yield json.loads(msg.data)
|
||||||
elif msg.type == aiohttp.WSMsgType.CLOSE:
|
elif msg.type == aiohttp.WSMsgType.CLOSED:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
raise RuntimeError(f"Unhandled WS message type: {msg!r}")
|
raise RuntimeError(f"Unhandled WS message type: {msg!r}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user