diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bd0ff04..c32a0d17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Use API generator for all APIs ([#551](https://github.com/opensearch-project/opensearch-py/pull/551)) - Merge `.pyi` type stubs inline ([#563](https://github.com/opensearch-project/opensearch-py/pull/563)) - Expanded type coverage to benchmarks, samples and tests ([#566](https://github.com/opensearch-project/opensearch-py/pull/566)) +- Defaulted `enable_cleanup_closed=True` in `aiohttp.TCPConnector` to prevent TLS connection leaks ([#468](https://github.com/opensearch-project/opensearch-py/pull/468)) ### Deprecated - Deprecated point-in-time APIs (list_all_point_in_time, create_point_in_time, delete_point_in_time) and Security Client APIs (health_check and update_audit_config) ([#502](https://github.com/opensearch-project/opensearch-py/pull/502)) ### Removed @@ -162,4 +163,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [2.2.0]: https://github.com/opensearch-project/opensearch-py/compare/v2.1.1...v2.2.0 [2.3.0]: https://github.com/opensearch-project/opensearch-py/compare/v2.2.0...v2.3.0 [2.3.1]: https://github.com/opensearch-project/opensearch-py/compare/v2.3.0...v2.3.1 -[2.3.2]: https://github.com/opensearch-project/opensearch-py/compare/v2.3.1...v2.3.2 \ No newline at end of file +[2.3.2]: https://github.com/opensearch-project/opensearch-py/compare/v2.3.1...v2.3.2 diff --git a/opensearchpy/_async/http_aiohttp.py b/opensearchpy/_async/http_aiohttp.py index 3c7010ed..f14d5384 100644 --- a/opensearchpy/_async/http_aiohttp.py +++ b/opensearchpy/_async/http_aiohttp.py @@ -376,7 +376,10 @@ async def _create_aiohttp_session(self) -> Any: cookie_jar=aiohttp.DummyCookieJar(), response_class=OpenSearchClientResponse, connector=aiohttp.TCPConnector( - limit=self._limit, use_dns_cache=True, ssl=self._ssl_context + limit=self._limit, + use_dns_cache=True, + enable_cleanup_closed=True, + ssl=self._ssl_context, ), trust_env=self._trust_env, )