Skip to content

Commit

Permalink
Revert "enter session only when it is not none. (#32359)" (#32391)
Browse files Browse the repository at this point in the history
This reverts commit b8dec12.
  • Loading branch information
xiangyan99 authored Oct 10, 2023
1 parent 964c603 commit 0f2f89e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions sdk/core/azure-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

### Bugs Fixed

- Added check that enter aiohttp session only when it is not None.

### Other Changes

## 1.29.4 (2023-09-07)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ async def open(self):
self.session = aiohttp.ClientSession(**clientsession_kwargs)
# pyright has trouble to understand that self.session is not None, since we raised at worst in the init
self.session = cast(aiohttp.ClientSession, self.session)
if self.session is not None:
await self.session.__aenter__()
await self.session.__aenter__()

async def close(self):
"""Closes the connection."""
Expand Down

0 comments on commit 0f2f89e

Please sign in to comment.