diff --git a/src/zeep/asyncio/transport.py b/src/zeep/asyncio/transport.py index 9f250bbf8..efb57d63e 100644 --- a/src/zeep/asyncio/transport.py +++ b/src/zeep/asyncio/transport.py @@ -46,7 +46,9 @@ def __init__(self, loop, cache=None, timeout=300, operation_timeout=None, def __del__(self): if self._close_session: - self.session.close() + # aiohttp.ClientSession.close() is async, + # call the underlying sync function instead. + self.session.connector.close() def _load_remote_data(self, url): result = None