[New-bugs-announce] [issue25473] socket.recv() raises correct code with the misleading description 'BlockingIOError: [Errno 11] Resource temporarily unavailable'
Alexey Gorshkov
report at bugs.python.org
Sun Oct 25 07:37:55 EDT 2015
New submission from Alexey Gorshkov:
(in continuation to bug https://bugs.python.org/issue25471 )
socket.recv() raises 'BlockingIOError: [Errno 11] Resource temporarily unavailable' in case, if setblocking(False) on socket returned by non-blocking socket's .accept() method and client does not sending data and didn't disconnected yet.
Not sure if I'm correct, but reading glibc doc on recv(), I think raised exception should be corrected: while code 11 correctly corresponds to EWOULDBLOCK, the misleading description 'Resource temporarily unavailable', probably, should be changed:
---
'EWOULDBLOCK'
Nonblocking mode has been set on the socket, and the read
operation would block. (Normally, 'recv' blocks until there
is input available to be read.)
---
attached file with testing server corrected for this issue
----------
files: s1.py
messages: 253425
nosy: animus
priority: normal
severity: normal
status: open
title: socket.recv() raises correct code with the misleading description 'BlockingIOError: [Errno 11] Resource temporarily unavailable'
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file40857/s1.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25473>
_______________________________________
More information about the New-bugs-announce
mailing list