From 30c85703c8f3b6cace64628ee182bf03084babf1 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 13 Feb 2023 19:32:44 +0800 Subject: [PATCH] Attempt to fix "cannot reopen console". Ref #2182 --- gns3server/utils/asyncio/telnet_server.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gns3server/utils/asyncio/telnet_server.py b/gns3server/utils/asyncio/telnet_server.py index 043d5370..0f6152e1 100644 --- a/gns3server/utils/asyncio/telnet_server.py +++ b/gns3server/utils/asyncio/telnet_server.py @@ -203,8 +203,7 @@ class AsyncioTelnetServer: except ConnectionError: async with self._lock: network_writer.close() - if sys.version_info >= (3, 7, 0): - await network_writer.wait_closed() + # await network_writer.wait_closed() # this doesn't work in Python 3.6 if self._reader_process == network_reader: self._reader_process = None # Cancel current read from this reader @@ -220,8 +219,7 @@ class AsyncioTelnetServer: writer.write_eof() await writer.drain() writer.close() - if sys.version_info >= (3, 7, 0): - await writer.wait_closed() + # await writer.wait_closed() # this doesn't work in Python 3.6 except (AttributeError, ConnectionError): continue