mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
gh-114077: Fix OverflowError in socket.sendfile() when pass count >2GiB (GH-114079)
This commit is contained in:
parent
c85c0026a6
commit
d4dfad2aa9
2 changed files with 3 additions and 1 deletions
|
|
@ -382,7 +382,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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue