mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Catch error when cannot resize Docker container TTY.
This commit is contained in:
parent
fb06eb3c0c
commit
f3749e83ec
@ -406,13 +406,11 @@ class BaseNode:
|
|||||||
Stops the telnet proxy.
|
Stops the telnet proxy.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self._wrapper_telnet_server:
|
if self._wrap_console_writer:
|
||||||
self._wrap_console_writer.close()
|
self._wrap_console_writer.close()
|
||||||
if sys.version_info >= (3, 7, 0):
|
await self._wrap_console_writer.wait_closed()
|
||||||
try:
|
self._wrap_console_writer = None
|
||||||
await self._wrap_console_writer.wait_closed()
|
if self._wrapper_telnet_server:
|
||||||
except ConnectionResetError:
|
|
||||||
pass
|
|
||||||
self._wrapper_telnet_server.close()
|
self._wrapper_telnet_server.close()
|
||||||
await self._wrapper_telnet_server.wait_closed()
|
await self._wrapper_telnet_server.wait_closed()
|
||||||
self._wrapper_telnet_server = None
|
self._wrapper_telnet_server = None
|
||||||
|
@ -710,7 +710,10 @@ class DockerVM(BaseNode):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# resize the container TTY.
|
# 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):
|
async def _start_console(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user