On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').
(cherry picked from commit
602a971a2af3a685d625c912c400cadd452718b1)
Co-authored-by: Victor Stinner <vstinner@python.org>
else:
ov.ReadFileInto(conn.fileno(), buf)
except BrokenPipeError:
- return self._result(b'')
+ return self._result(0)
def finish_recv(trans, key, ov):
try:
--- /dev/null
+On Windows, fix asyncio ``recv_into()`` return value when the socket/pipe is
+closed (:exc:`BrokenPipeError`): return ``0`` rather than an empty byte
+string (``b''``).