summaryrefslogtreecommitdiff
path: root/kvmd/htserver.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-08-07 19:18:23 +0300
committerMaxim Devaev <[email protected]>2022-08-07 19:18:23 +0300
commitfdc3edfa799b21f04a83676459bab7a4e67b056f (patch)
tree9c91c905c241094bfde6a620cc81b476a9f3f9ab /kvmd/htserver.py
parent1d4b39ef1b039e7eeb2ceca74a7f9d40bfbeb0c0 (diff)
using shield_fg()
Diffstat (limited to 'kvmd/htserver.py')
-rw-r--r--kvmd/htserver.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/kvmd/htserver.py b/kvmd/htserver.py
index 16d152b3..a83fc17c 100644
--- a/kvmd/htserver.py
+++ b/kvmd/htserver.py
@@ -61,6 +61,8 @@ from .errors import IsBusyError
from .validators import ValidatorError
+from . import aiotools
+
# =====
class HttpError(Exception):
@@ -352,7 +354,7 @@ class HttpServer:
await self._on_ws_opened()
yield ws
finally:
- await asyncio.shield(self.__close_ws(ws))
+ await aiotools.shield_fg(self.__close_ws(ws))
async def _ws_loop(self, ws: WsSession) -> WebSocketResponse:
logger = get_logger()