From 64b4c8f43a501f005f60a3bf3159d29722af3d94 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 8 Jan 2019 21:09:47 -0800 Subject: [PATCH] Fix deprecation warning (#19882) --- homeassistant/helpers/aiohttp_client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/helpers/aiohttp_client.py b/homeassistant/helpers/aiohttp_client.py index 53b246c700d..b2669312e38 100644 --- a/homeassistant/helpers/aiohttp_client.py +++ b/homeassistant/helpers/aiohttp_client.py @@ -155,10 +155,9 @@ def _async_get_connector(hass, verify_ssl=True): connector = aiohttp.TCPConnector(loop=hass.loop, ssl=ssl_context) hass.data[key] = connector - @callback - def _async_close_connector(event): + async def _async_close_connector(event): """Close connector pool.""" - connector.close() + await connector.close() hass.bus.async_listen_once( EVENT_HOMEASSISTANT_CLOSE, _async_close_connector)