aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/socket.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-02-07 09:25:06 +0300
committerAlexander Smirnov <alex@ydb.tech>2024-02-09 19:18:32 +0300
commitf0785dc88eee3da0f1514f5b4cafa931571e669d (patch)
tree44165310ad6023cd29776f9b1b4477364cd2b5bb /contrib/tools/python3/src/Lib/socket.py
parent2c0985fb513cb5b352324abf223bf749c6c2bd24 (diff)
downloadydb-f0785dc88eee3da0f1514f5b4cafa931571e669d.tar.gz
Update Python 3 to 3.11.8
Diffstat (limited to 'contrib/tools/python3/src/Lib/socket.py')
-rw-r--r--contrib/tools/python3/src/Lib/socket.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/tools/python3/src/Lib/socket.py b/contrib/tools/python3/src/Lib/socket.py
index b5d46eb32b..a0567b76bc 100644
--- a/contrib/tools/python3/src/Lib/socket.py
+++ b/contrib/tools/python3/src/Lib/socket.py
@@ -381,7 +381,7 @@ class socket(_socket.socket):
if timeout and not selector_select(timeout):
raise TimeoutError('timed out')
if count:
- blocksize = count - total_sent
+ blocksize = min(count - total_sent, blocksize)
if blocksize <= 0:
break
try: