mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Set aiohttp shutdown_timeout on AppRunner instead of TCPSite (#105973)
This commit is contained in:
parent
b35afccdb7
commit
446f560b59
@ -520,7 +520,9 @@ class HomeAssistantHTTP:
|
|||||||
# pylint: disable-next=protected-access
|
# pylint: disable-next=protected-access
|
||||||
self.app._router.freeze = lambda: None # type: ignore[method-assign]
|
self.app._router.freeze = lambda: None # type: ignore[method-assign]
|
||||||
|
|
||||||
self.runner = web.AppRunner(self.app, handler_cancellation=True)
|
self.runner = web.AppRunner(
|
||||||
|
self.app, handler_cancellation=True, shutdown_timeout=10
|
||||||
|
)
|
||||||
await self.runner.setup()
|
await self.runner.setup()
|
||||||
|
|
||||||
self.site = HomeAssistantTCPSite(
|
self.site = HomeAssistantTCPSite(
|
||||||
|
@ -29,7 +29,6 @@ class HomeAssistantTCPSite(web.BaseSite):
|
|||||||
host: None | str | list[str],
|
host: None | str | list[str],
|
||||||
port: int,
|
port: int,
|
||||||
*,
|
*,
|
||||||
shutdown_timeout: float = 10.0,
|
|
||||||
ssl_context: SSLContext | None = None,
|
ssl_context: SSLContext | None = None,
|
||||||
backlog: int = 128,
|
backlog: int = 128,
|
||||||
reuse_address: bool | None = None,
|
reuse_address: bool | None = None,
|
||||||
@ -38,7 +37,6 @@ class HomeAssistantTCPSite(web.BaseSite):
|
|||||||
"""Initialize HomeAssistantTCPSite."""
|
"""Initialize HomeAssistantTCPSite."""
|
||||||
super().__init__(
|
super().__init__(
|
||||||
runner,
|
runner,
|
||||||
shutdown_timeout=shutdown_timeout,
|
|
||||||
ssl_context=ssl_context,
|
ssl_context=ssl_context,
|
||||||
backlog=backlog,
|
backlog=backlog,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user