1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-18 06:18:08 +00:00

Catch ConnectionResetError when waiting for the wrap console

This commit is contained in:
grossmj 2023-05-25 18:29:19 +08:00
parent 72af145a23
commit 0f02cff5f2

View File

@ -409,7 +409,10 @@ class BaseNode:
if self._wrapper_telnet_server:
self._wrap_console_writer.close()
if sys.version_info >= (3, 7, 0):
await self._wrap_console_writer.wait_closed()
try:
await self._wrap_console_writer.wait_closed()
except ConnectionResetError:
pass
self._wrapper_telnet_server.close()
await self._wrapper_telnet_server.wait_closed()
self._wrapper_telnet_server = None