mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-20 21:33:09 +00:00
parent
ecfa89cba8
commit
928d9f13f4
@ -333,7 +333,17 @@ class BaseNode:
|
||||
"""
|
||||
if not self._wrap_console:
|
||||
return
|
||||
remaining_trial = 60
|
||||
while True:
|
||||
try:
|
||||
(reader, writer) = yield from asyncio.open_connection(host="127.0.0.1", port=self._internal_console_port)
|
||||
break
|
||||
except (OSError, ConnectionRefusedError) as e:
|
||||
print(self._internal_console_port)
|
||||
if remaining_trial <= 0:
|
||||
raise e
|
||||
yield from asyncio.sleep(0.1)
|
||||
remaining_trial -= 1
|
||||
yield from AsyncioTelnetServer.write_client_intro(writer, echo=True)
|
||||
server = AsyncioTelnetServer(reader=reader, writer=writer, binary=True, echo=True)
|
||||
self._wrapper_telnet_server = yield from asyncio.start_server(server.run, self._manager.port_manager.console_host, self.console)
|
||||
|
@ -922,7 +922,8 @@ class QemuVM(BaseNode):
|
||||
self.status = "stopped"
|
||||
self._hw_virtualization = False
|
||||
self._process = None
|
||||
if returncode != 0:
|
||||
# A return code of 1 seem fine on Windows
|
||||
if returncode != 0 and (returncode != 1 or not sys.platform.startswith("win")):
|
||||
self.project.emit("log.error", {"message": "QEMU process has stopped, return code: {}\n{}".format(returncode, self.read_stdout())})
|
||||
|
||||
@asyncio.coroutine
|
||||
|
Loading…
Reference in New Issue
Block a user