Skip to content

Commit 45b74cf

Browse files
authored
Remove manual release call in middleware (#10952)
1 parent 06e3b36 commit 45b74cf

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

CHANGES/10952.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9732.feature.rst

aiohttp/client_middleware_digest_auth.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,6 @@ async def __call__(
408408
# Check if we need to authenticate
409409
if not self._authenticate(response):
410410
break
411-
elif retry_count < 1:
412-
response.release() # Release the response to enable connection reuse on retry
413411

414412
# At this point, response is guaranteed to be defined
415413
assert response is not None

tests/test_client_middleware.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,6 @@ async def __call__(
891891
response = await handler(request)
892892
if retry_count == 0:
893893
retry_count += 1
894-
response.release() # Release the response to enable connection reuse
895894
continue
896895
return response
897896

0 commit comments

Comments
 (0)