Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use suggested min expression
  • Loading branch information
bdraco committed Jul 23, 2023
commit bde4502f12fe3dfff4c230da73cd67bfe7b9e981
3 changes: 1 addition & 2 deletions Lib/asyncio/unix_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@ def _sock_sendfile_native_impl(self, fut, registered_fd, sock, fileno,
return

# On 32-bit architectures truncate to 1GiB to avoid OverflowError
if sys.maxsize < 2 ** 32:
blocksize = min(blocksize, 2 ** 30)
blocksize = min(blocksize, sys.maxsize//2 + 1)

try:
sent = os.sendfile(fd, fileno, offset, blocksize)
Expand Down