Skip to content

Commit

Permalink
Fix unclosed aiohttp.ClientSession during __del__
Browse files Browse the repository at this point in the history
  • Loading branch information
vdboor committed Apr 26, 2018
1 parent e80c97e commit 50703bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/zeep/asyncio/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50703bd

Please sign in to comment.