mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
4 files changed
+21
-34
No files matched your search
@@ -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={
|
||||
|
||||
Reference in new issue
Block a user