From c3cac9371be5c6d18f42d6dfe6bf98786b410891 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Wed, 12 Jan 2022 20:12:51 +0100 Subject: [PATCH] Fix: main eventloop is not running while webserver is (#56) run_app() runs the webserver till it is done (read: never), but since the latest aiohttp it does this in its own eventloop. Read: the main eventloop is not running inside run_app(). Fix this by explicitly telling to use the mainloop instead. --- master_server/application/master_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/master_server/application/master_server.py b/master_server/application/master_server.py index 5975a30..efe4674 100644 --- a/master_server/application/master_server.py +++ b/master_server/application/master_server.py @@ -86,7 +86,7 @@ def run(self, bind, msu_port, web_port): webapp = web.Application() webapp.add_routes(routes) - web.run_app(webapp, host=bind, port=web_port, access_log_class=ErrorOnlyAccessLogger) + web.run_app(webapp, host=bind, port=web_port, access_log_class=ErrorOnlyAccessLogger, loop=loop) log.info("Shutting down master server ...")