Skip to content

Commit

Permalink
Set enable_cleanup_closed=True
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmlarson committed Feb 11, 2022
1 parent bcd6efb commit ecd4d5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions elasticsearch/_async/http_aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,16 @@ async def _create_aiohttp_session(self):
self.loop = get_running_loop()
self.session = aiohttp.ClientSession(
headers=self.headers,
skip_auto_headers=("accept", "accept-encoding"),
skip_auto_headers=("accept", "accept-encoding", "user-agent"),
auto_decompress=True,
loop=self.loop,
cookie_jar=aiohttp.DummyCookieJar(),
response_class=ESClientResponse,
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,
),
)

Expand Down

0 comments on commit ecd4d5e

Please sign in to comment.