Skip to content

Commit

Permalink
Fix ClientResponse.close releasing the connection instead of closing (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored and Xiang Li committed Dec 4, 2023
1 parent badd54a commit 6799a0d
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 238 deletions.
1 change: 1 addition & 0 deletions CHANGES/7869.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ClientResponse.close releasing the connection instead of closing
4 changes: 3 additions & 1 deletion aiohttp/client_reqrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,9 @@ def close(self) -> None:
return

self._cleanup_writer()
self._release_connection()
if self._connection is not None:
self._connection.close()
self._connection = None

def release(self) -> Any:
if not self._released:
Expand Down
Loading

0 comments on commit 6799a0d

Please sign in to comment.