Skip to content

Commit

Permalink
fix calling close when there is no session #922 (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
thehesiod committed Mar 4, 2022
1 parent 833694a commit 6491e3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changes
-------
2.1.2 (2022-03-03)
^^^^^^^^^^^^^^^^^^
* fix httpsession close call

2.1.1 (2022-02-10)
^^^^^^^^^^^^^^^^^^
* implement asynchronous non-blocking adaptive retry strategy
Expand Down
2 changes: 1 addition & 1 deletion aiobotocore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

__all__ = ['get_session', 'AioSession']

__version__ = '2.1.1'
__version__ = '2.1.2'
4 changes: 2 additions & 2 deletions aiobotocore/httpsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ async def __aenter__(self):
async def __aexit__(self, exc_type, exc_val, exc_tb):
if self._session:
await self._session.__aexit__(exc_type, exc_val, exc_tb)
self._session = None

async def close(self):
await self._session.__aexit__(None, None, None)
self._session = None
await self.__aexit__(None, None, None)

def _get_ssl_context(self):
ssl_context = create_urllib3_context()
Expand Down

0 comments on commit 6491e3c

Please sign in to comment.