diff options
author | shadchin <shadchin@yandex-team.com> | 2024-02-07 09:25:06 +0300 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-02-09 19:18:32 +0300 |
commit | f0785dc88eee3da0f1514f5b4cafa931571e669d (patch) | |
tree | 44165310ad6023cd29776f9b1b4477364cd2b5bb /contrib/tools/python3/src/Lib/http/client.py | |
parent | 2c0985fb513cb5b352324abf223bf749c6c2bd24 (diff) | |
download | ydb-f0785dc88eee3da0f1514f5b4cafa931571e669d.tar.gz |
Update Python 3 to 3.11.8
Diffstat (limited to 'contrib/tools/python3/src/Lib/http/client.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/http/client.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/tools/python3/src/Lib/http/client.py b/contrib/tools/python3/src/Lib/http/client.py index 87bca4d76a..1ee22989ae 100644 --- a/contrib/tools/python3/src/Lib/http/client.py +++ b/contrib/tools/python3/src/Lib/http/client.py @@ -663,6 +663,8 @@ class HTTPResponse(io.BufferedIOBase): self._close_conn() elif self.length is not None: self.length -= len(result) + if not self.length: + self._close_conn() return result def peek(self, n=-1): @@ -687,6 +689,8 @@ class HTTPResponse(io.BufferedIOBase): self._close_conn() elif self.length is not None: self.length -= len(result) + if not self.length: + self._close_conn() return result def _read1_chunked(self, n): |