1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 05:57:01 +00:00

Fix ssl context being recreated frequently in httpx (#89932)

* Fix ssl context being created every time in httpx

* its expensive, only do it once
This commit is contained in:
J. Nick Koston
2023-03-18 23:13:48 -10:00
committed by GitHub
parent 0e7bd401f2
commit 87264d219a
3 changed files with 12 additions and 2 deletions

View File

@@ -271,7 +271,7 @@ def _async_get_connector(
return cast(aiohttp.BaseConnector, hass.data[key])
if verify_ssl:
ssl_context: bool | SSLContext = ssl_util.client_context()
ssl_context: bool | SSLContext = ssl_util.get_default_context()
else:
ssl_context = False