Fix GNS3VM settings are lost at startup

Fix #926
This commit is contained in:
Julien Duponchelle committed 2017-03-07 15:36:35 +01:00
1 parent d89ea83746
commit 7b642552dd
4 files changed
+21 -34

No files matched your search

+1 -9
View File
@@ -249,13 +249,6 @@ class WebServer:
time.sleep(1) # this is to prevent too many request to slow down the server
log.debug("UDP server discovery stopped")
@asyncio.coroutine
def _on_startup(self, *args):
"""
Called when the HTTP server start
"""
yield from Controller.instance().start()
def run(self):
"""
Starts the server.
@@ -295,9 +288,8 @@ class WebServer:
for key, val in os.environ.items():
log.debug("ENV %s=%s", key, val)
self._loop.run_until_complete(Controller.instance().start())
self._app = aiohttp.web.Application()
# Background task started with the server
self._app.on_startup.append(self._on_startup)
# Allow CORS for this domains
cors = aiohttp_cors.setup(self._app, defaults={