diff --git a/featureflags_client/http/managers/aiohttp.py b/featureflags_client/http/managers/aiohttp.py index 6645a6f..313e8a9 100644 --- a/featureflags_client/http/managers/aiohttp.py +++ b/featureflags_client/http/managers/aiohttp.py @@ -43,7 +43,7 @@ def __init__( # noqa: PLR0913 ) self._session = aiohttp.ClientSession(base_url=url) - async def close_client(self) -> None: + async def close(self) -> None: await self._session.close() async def _post( # type: ignore diff --git a/featureflags_client/http/managers/base.py b/featureflags_client/http/managers/base.py index 9c8075f..3652bdf 100644 --- a/featureflags_client/http/managers/base.py +++ b/featureflags_client/http/managers/base.py @@ -170,7 +170,7 @@ async def _post( # type: ignore pass @abstractmethod - async def close_client(self) -> None: + async def close(self) -> None: pass def get(self, name: str) -> Optional[Callable[[Dict], bool]]: @@ -246,7 +246,7 @@ async def wait_closed(self) -> None: if error is not None: log.error("Flags refresh task exited with error: %r", error) - await self.close_client() + await self.close() async def _refresh_loop(self) -> None: log.info("Flags refresh task started") diff --git a/featureflags_client/http/managers/httpx.py b/featureflags_client/http/managers/httpx.py index 374d44a..4b7ceed 100644 --- a/featureflags_client/http/managers/httpx.py +++ b/featureflags_client/http/managers/httpx.py @@ -43,7 +43,7 @@ def __init__( # noqa: PLR0913 ) self._session = httpx.AsyncClient(base_url=url) - async def close_client(self) -> None: + async def close(self) -> None: await self._session.aclose() async def _post( # type: ignore