mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-11 16:41:04 +00:00
Attempt to fix "cannot reopen console". Ref #2182
This commit is contained in:
parent
2b6bec1b93
commit
30c85703c8
@ -203,8 +203,7 @@ class AsyncioTelnetServer:
|
|||||||
except ConnectionError:
|
except ConnectionError:
|
||||||
async with self._lock:
|
async with self._lock:
|
||||||
network_writer.close()
|
network_writer.close()
|
||||||
if sys.version_info >= (3, 7, 0):
|
# await network_writer.wait_closed() # this doesn't work in Python 3.6
|
||||||
await network_writer.wait_closed()
|
|
||||||
if self._reader_process == network_reader:
|
if self._reader_process == network_reader:
|
||||||
self._reader_process = None
|
self._reader_process = None
|
||||||
# Cancel current read from this reader
|
# Cancel current read from this reader
|
||||||
@ -220,8 +219,7 @@ class AsyncioTelnetServer:
|
|||||||
writer.write_eof()
|
writer.write_eof()
|
||||||
await writer.drain()
|
await writer.drain()
|
||||||
writer.close()
|
writer.close()
|
||||||
if sys.version_info >= (3, 7, 0):
|
# await writer.wait_closed() # this doesn't work in Python 3.6
|
||||||
await writer.wait_closed()
|
|
||||||
except (AttributeError, ConnectionError):
|
except (AttributeError, ConnectionError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user