diff --git a/README.md b/README.md index eef687d..c4bb15b 100644 --- a/README.md +++ b/README.md @@ -247,5 +247,5 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b ### 0.0.42 * Add connection close header -* Add debug connection pool logging +* Add connection pools function * Remove UTF8 from content-type string diff --git a/wiserHeatAPIv2/rest_controller.py b/wiserHeatAPIv2/rest_controller.py index 5af42c7..490339d 100644 --- a/wiserHeatAPIv2/rest_controller.py +++ b/wiserHeatAPIv2/rest_controller.py @@ -125,9 +125,8 @@ def _do_hub_action(self, action: WiserRestActionEnum, url: str, data: dict = Non f"Connection error trying to communicate with Wiser Hub {self._wiser_connection.host}. Error is {ex}" ) - finally: - # Print out number of connections in pool - _LOGGER.debug(f"Hub Request Pool connections: {self._requests_session.get_adapter(url).poolmanager.pools}") + def get_connection_pools(self): + return self._requests_session.get_adapter(WISERHUBDOMAIN.format(self._wiser_connection.host)).poolmanager.pools def _process_nok_response(self, response, raise_for_endpoint_error: bool = True): if response.status_code == 401: