Fix deprecation warning (#19882)

This commit is contained in:
Paulus Schoutsen 2019-01-08 21:09:47 -08:00 committed by GitHub
parent a3d05328ec
commit 64b4c8f43a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)