Enables variants to override creation and ...

... startup by exposing the method `start_site`.
This commit is contained in:
Carlos Nihelton 2022-06-02 13:15:50 -03:00
parent 05f057a4e7
commit d69c2eee82
No known key found for this signature in database
GPG Key ID: 6FE346D245197E9A
1 changed files with 3 additions and 0 deletions

View File

@ -502,6 +502,9 @@ class SubiquityServer(Application):
controller.add_routes(app)
runner = web.AppRunner(app, keepalive_timeout=0xffffffff)
await runner.setup()
await self.start_site(runner)
async def start_site(self, runner: web.AppRunner):
site = web.UnixSite(runner, self.opts.socket)
await site.start()
# It is intended that a non-root client can connect.