Skip to content

Commit

Permalink
ProxiedHttpSessionManager check if session is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
Henkhogan committed Mar 25, 2024
1 parent b19332c commit 95d7442
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/http_session_manager/proxied.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ async def session(self):
"""do not enter, exit, or close the returned session"""
try:
_http_session = self._http_session_pool.pop(0)
if _http_session.closed:
_http_session = proxied_http_session_factory()
except IndexError:
_http_session = proxied_http_session_factory()

Expand Down

0 comments on commit 95d7442

Please sign in to comment.