diff --git a/gns3server/compute/base_node.py b/gns3server/compute/base_node.py index 13da0a8c..c95138e4 100644 --- a/gns3server/compute/base_node.py +++ b/gns3server/compute/base_node.py @@ -406,13 +406,11 @@ class BaseNode: Stops the telnet proxy. """ - if self._wrapper_telnet_server: + if self._wrap_console_writer: self._wrap_console_writer.close() - if sys.version_info >= (3, 7, 0): - try: - await self._wrap_console_writer.wait_closed() - except ConnectionResetError: - pass + await self._wrap_console_writer.wait_closed() + self._wrap_console_writer = None + if self._wrapper_telnet_server: self._wrapper_telnet_server.close() await self._wrapper_telnet_server.wait_closed() self._wrapper_telnet_server = None diff --git a/gns3server/compute/docker/docker_vm.py b/gns3server/compute/docker/docker_vm.py index 334af520..24a70e94 100644 --- a/gns3server/compute/docker/docker_vm.py +++ b/gns3server/compute/docker/docker_vm.py @@ -710,7 +710,10 @@ class DockerVM(BaseNode): """ # resize the container TTY. - await self._manager.query("POST", "containers/{}/resize?h={}&w={}".format(self._cid, rows, columns)) + try: + await self._manager.query("POST", "containers/{}/resize?h={}&w={}".format(self._cid, rows, columns)) + except DockerError as e: + log.warning(f"Could not resize the container TTY: {e}") async def _start_console(self): """