From 394af7a180ecb81b39c4bbd8300a4404ff72e867 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Wed, 10 Mar 2021 17:45:56 +0300 Subject: fixed ws event CLOSED --- kvmd/clients/kvmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvmd/clients/kvmd.py b/kvmd/clients/kvmd.py index d1934cd4..2ee6c60a 100644 --- a/kvmd/clients/kvmd.py +++ b/kvmd/clients/kvmd.py @@ -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}") -- cgit v1.2.3