Skip to content

Commit

Permalink
Fix: main eventloop is not running while webserver is (#56)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TrueBrain authored Jan 12, 2022
1 parent 77b9d4c commit c3cac93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion master_server/application/master_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...")

Expand Down

0 comments on commit c3cac93

Please sign in to comment.