summaryrefslogtreecommitdiff
path: root/kvmd/apps
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/apps
parent1d4b39ef1b039e7eeb2ceca74a7f9d40bfbeb0c0 (diff)
using shield_fg()
Diffstat (limited to 'kvmd/apps')
-rw-r--r--kvmd/apps/kvmd/info/extras.py2
-rw-r--r--kvmd/apps/vnc/rfb/__init__.py2
-rw-r--r--kvmd/apps/vnc/server.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/apps/kvmd/info/extras.py b/kvmd/apps/kvmd/info/extras.py
index 3a1721c8..9e70d05c 100644
--- a/kvmd/apps/kvmd/info/extras.py
+++ b/kvmd/apps/kvmd/info/extras.py
@@ -66,7 +66,7 @@ class ExtrasInfoSubmanager(BaseInfoSubmanager):
return None
finally:
if sui is not None:
- await asyncio.shield(sui.close())
+ await aiotools.shield_fg(sui.close())
def __get_extras_path(self, *parts: str) -> str:
return os.path.join(self.__global_config.kvmd.info.extras, *parts)
diff --git a/kvmd/apps/vnc/rfb/__init__.py b/kvmd/apps/vnc/rfb/__init__.py
index 172d52ba..059d4d1d 100644
--- a/kvmd/apps/vnc/rfb/__init__.py
+++ b/kvmd/apps/vnc/rfb/__init__.py
@@ -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:
diff --git a/kvmd/apps/vnc/server.py b/kvmd/apps/vnc/server.py
index 151f6374..7fac9aa4 100644
--- a/kvmd/apps/vnc/server.py
+++ b/kvmd/apps/vnc/server.py
@@ -147,7 +147,7 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes
fb_sender=self.__fb_sender_task_loop(),
)
finally:
- await asyncio.shield(self.__cleanup())
+ await aiotools.shield_fg(self.__cleanup())
async def __cleanup(self) -> None:
if self.__kvmd_session:
@@ -498,7 +498,7 @@ class VncServer: # pylint: disable=too-many-instance-attributes
except Exception:
logger.exception("%s [entry]: Unhandled exception in client task", remote)
finally:
- await asyncio.shield(cleanup_client(writer))
+ await aiotools.shield_fg(cleanup_client(writer))
self.__handle_client = handle_client