summaryrefslogtreecommitdiff
path: root/kvmd/apps/vnc/rfb/stream.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-05-11 19:35:36 +0300
committerDevaev Maxim <[email protected]>2020-05-11 19:35:36 +0300
commit10f3b5f6a390e176e46d422de4c1e0dcb1816884 (patch)
treedaba50c6578d60442d45595a196ea5a21dc94d05 /kvmd/apps/vnc/rfb/stream.py
parent98a176f7408350741f89547ea6d1d6e519965cbf (diff)
abort vnc connection
Diffstat (limited to 'kvmd/apps/vnc/rfb/stream.py')
-rw-r--r--kvmd/apps/vnc/rfb/stream.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/kvmd/apps/vnc/rfb/stream.py b/kvmd/apps/vnc/rfb/stream.py
index 49d86931..2d711fa7 100644
--- a/kvmd/apps/vnc/rfb/stream.py
+++ b/kvmd/apps/vnc/rfb/stream.py
@@ -128,8 +128,10 @@ class RfbClientStream:
self.__reader = ssl_reader
self.__writer = ssl_writer
- def _close(self) -> None:
+ async def _close(self) -> None:
+ self.__writer.transport.abort()
try:
self.__writer.close()
except Exception:
pass
+ await self.__writer.wait_closed()