summaryrefslogtreecommitdiff
path: root/kvmd/plugins/msd/relay/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/msd/relay/__init__.py')
-rw-r--r--kvmd/plugins/msd/relay/__init__.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/kvmd/plugins/msd/relay/__init__.py b/kvmd/plugins/msd/relay/__init__.py
index 14f903f1..9e507556 100644
--- a/kvmd/plugins/msd/relay/__init__.py
+++ b/kvmd/plugins/msd/relay/__init__.py
@@ -249,8 +249,14 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
yield self.__device_writer
await self.__write_image_info(True)
finally:
- await self.__close_device_writer()
- await self.__load_device_info()
+ try:
+ await asyncio.shield(self.__close_device_writer())
+ except asyncio.CancelledError:
+ pass
+ try:
+ await asyncio.shield(self.__load_device_info())
+ except asyncio.CancelledError:
+ pass
@aiotools.atomic
async def remove(self, name: str) -> None: