fixed ws event CLOSED

This commit is contained in:
Devaev Maxim 2021-03-10 17:45:56 +03:00
parent 5a1a22b27c
commit 394af7a180

View File

@ -153,7 +153,7 @@ class KvmdClientWs:
msg = receive_task.result()
if msg.type == aiohttp.WSMsgType.TEXT:
yield json.loads(msg.data)
elif msg.type == aiohttp.WSMsgType.CLOSE:
elif msg.type == aiohttp.WSMsgType.CLOSED:
break
else:
raise RuntimeError(f"Unhandled WS message type: {msg!r}")