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

Wait longer for x11 socket file to be created. Ref #1761

This commit is contained in:
grossmj 2020-06-10 20:37:13 +09:30
parent 3940f013d4
commit f498ab06b4
2 changed files with 5 additions and 2 deletions

View File

@ -615,7 +615,10 @@ class DockerVM(BaseNode):
raise DockerError("Please install TigerVNC server (recommended) or Xvfb + x11vnc before using VNC support")
await self._start_vnc_process()
x11_socket = os.path.join("/tmp/.X11-unix/", "X{}".format(self._display))
await wait_for_file_creation(x11_socket)
try:
await wait_for_file_creation(x11_socket)
except asyncio.TimeoutError:
raise DockerError('x11 socket file "{}" does not exist'.format(x11_socket))
if not hasattr(sys, "_called_from_test") or not sys._called_from_test:
# Start vncconfig for tigervnc clipboard support, connection available only after socket creation.

View File

@ -126,7 +126,7 @@ def monitor_process(process, termination_callback):
asyncio.ensure_future(_check_process(process, termination_callback))
async def wait_for_file_creation(path, timeout=10):
async def wait_for_file_creation(path, timeout=60):
while timeout > 0:
if os.path.exists(path):