using shield_fg()

This commit is contained in:
Maxim Devaev
2022-08-07 19:18:23 +03:00
parent 1d4b39ef1b
commit fdc3edfa79
7 changed files with 16 additions and 30 deletions

View File

@@ -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()