Message374760
The proactor event loop of asyncio returns b'' on recv_into() if the socket/pipe is closed:
def recv_into(self, conn, buf, flags=0):
...
try:
...
except BrokenPipeError:
return self._result(b'')
...
But a socket recv_into() must always return a number: the number of written bytes. Example with socket.socket.recv_into() method:
https://docs.python.org/3/library/socket.html#socket.socket.recv_into
IMHO zero must be returned here. This bug may be the root cause of bpo-38912 bug.
Attached PR fix the issue. |
|
Date |
User |
Action |
Args |
2020-08-03 22:19:50 | vstinner | set | recipients:
+ vstinner, asvetlov, yselivanov |
2020-08-03 22:19:49 | vstinner | set | messageid: <1596493189.98.0.797069593692.issue41467@roundup.psfhosted.org> |
2020-08-03 22:19:49 | vstinner | link | issue41467 messages |
2020-08-03 22:19:49 | vstinner | create | |
|