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

@@ -101,7 +101,7 @@ class RfbClient(RfbClientStream): # pylint: disable=too-many-instance-attribute
try:
await aiotools.wait_first(*tasks)
finally:
await asyncio.shield(self.__cleanup(tasks))
await aiotools.shield_fg(self.__cleanup(tasks))
async def __cleanup(self, tasks: List[asyncio.Task]) -> None:
for task in tasks: