Skip to content

Commit

Permalink
Closing aiohttp session should be awaited (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsitruk authored and thehesiod committed Oct 18, 2019
1 parent 6536fb1 commit 2a9426c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aiobotocore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ async def __aenter__(self):
async def __aexit__(self, exc_type, exc_val, exc_tb):
await self._endpoint._aio_session.__aexit__(exc_type, exc_val, exc_tb)

def close(self):
"""Close all http connections. This is coroutine, and should be
awaited. Method will be coroutine (instead returning Future) once
aiohttp does that.
"""
return self._endpoint._aio_session.close()
async def close(self):
"""Close all http connections."""
return await self._endpoint._aio_session.close()

0 comments on commit 2a9426c

Please sign in to comment.