Skip to content

Commit

Permalink
set shutdown timeout to AppRunner instead of site
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Jul 19, 2024
1 parent c03dd1e commit 8ffc5a0
Show file tree
Hide file tree
Showing 3 changed files with 313 additions and 304 deletions.
7 changes: 2 additions & 5 deletions aiomisc/service/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,12 @@ async def create_site(self) -> SockSite:
if getattr(self, "runner", None) is None:
raise RuntimeError("runner already created")

return SockSite(
self.runner, self.socket,
shutdown_timeout=self.shutdown_timeout,
)
return SockSite(self.runner, self.socket)

async def make_runner(self, application: Application) -> AppRunner:
return AppRunner(
application,
shutdown_timeout=self.shutdown_timeout,
**self.runner_kwargs,
)

Expand Down Expand Up @@ -129,7 +127,6 @@ async def create_site(self) -> SockSite:

return SockSite(
self.runner, self.socket,
shutdown_timeout=self.shutdown_timeout,
ssl_context=await self.loop.run_in_executor(
None, self.__ssl_options.create_context,
),
Expand Down
Loading

0 comments on commit 8ffc5a0

Please sign in to comment.