Skip to content

Commit

Permalink
Merge pull request #11 from DigitalBites/fix_too_many_connection_requ…
Browse files Browse the repository at this point in the history
…ests

create separate config instance and change max pool configuration
  • Loading branch information
dcramer committed Aug 26, 2023
2 parents dde0805 + 39c137c commit 8708b22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/luxor/__init__.py
Expand Up @@ -27,9 +27,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
hass.data.setdefault(DOMAIN, {})

host = entry.data.get(CONF_HOST)
api_client = luxor_openapi_asyncio.ApiClient(
luxor_openapi_asyncio.Configuration(host="http://{}".format(host))
)
api_client_config = luxor_openapi_asyncio.Configuration(host="http://{}".format(host))
api_client_config.connection_pool_maxsize = 1
api_client = luxor_openapi_asyncio.ApiClient(api_client_config)

api_instance = controller_api.ControllerApi(api_client)

Expand Down

0 comments on commit 8708b22

Please sign in to comment.