New submission from Alexey Gorshkov: socket created with listening socket set to setblocking(False). gettimeout() of accept()-returned socket returns 0.0 , but recv() method blocks while client is connected and not sending any data. If client disconnects, socket returned by accept() starting return 0-length bytes string without blocking.
glibc doc on recv(): --- If nonblocking mode is set for SOCKET, and no data are available to be read, 'recv' fails immediately rather than waiting. --- testing server and client code attached. tested with Python 3.5.0 and Python 2.7.10 ---------- files: s1.py messages: 253418 nosy: animus priority: normal severity: normal status: open title: socket.recv() blocks while it's gettimeout() returns 0.0 versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file40855/s1.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25471> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com