Skip to content
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
5 changes: 3 additions & 2 deletions Lib/multiprocessing/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,12 @@ def _recv(self, size, read=_read):
buf = io.BytesIO()
handle = self._handle
remaining = size
is_pipe = False
is_pipe = is_socket = False
if size > self._default_pipe_size > 0:
mode = os.fstat(handle).st_mode
is_pipe = stat.S_ISFIFO(mode)
limit = self._default_pipe_size if is_pipe else remaining
is_socket = stat.S_ISSOCK(mode)
limit = self._default_pipe_size if is_pipe or is_socket else remaining
while remaining > 0:
to_read = min(limit, remaining)
chunk = read(handle, to_read)
Expand Down