diff options
author | Victor Stinner <vstinner@python.org> | 2020-08-04 00:40:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 00:40:10 (GMT) |
commit | 602a971a2af3a685d625c912c400cadd452718b1 (patch) | |
tree | 008054d98cbece7e215c1e95e17b58b35fecd0b8 /Lib/asyncio/windows_events.py | |
parent | bde48fd8110cc5f128d5db44810d17811e328a24 (diff) | |
download | cpython-602a971a2af3a685d625c912c400cadd452718b1.zip cpython-602a971a2af3a685d625c912c400cadd452718b1.tar.gz cpython-602a971a2af3a685d625c912c400cadd452718b1.tar.bz2 |
bpo-41467: Fix asyncio recv_into() on Windows (GH-21720)
On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').
Diffstat (limited to 'Lib/asyncio/windows_events.py')
-rw-r--r-- | Lib/asyncio/windows_events.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py index c07fe32..a6759b7 100644 --- a/Lib/asyncio/windows_events.py +++ b/Lib/asyncio/windows_events.py @@ -469,7 +469,7 @@ class IocpProactor: else: ov.ReadFileInto(conn.fileno(), buf) except BrokenPipeError: - return self._result(b'') + return self._result(0) def finish_recv(trans, key, ov): try: |