[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Alexey Gorshkov

Alexey Gorshkov added the comment:

telnet 127.0.0.1 9000 can be used as testing client

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Alexey Gorshkov

Changes by Alexey Gorshkov :


Removed file: http://bugs.python.org/file40855/s1.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Alexey Gorshkov

Changes by Alexey Gorshkov :


Added file: http://bugs.python.org/file40856/s1.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 10e044a734f3 by Benjamin Peterson in branch '3.4':
accepted sockets shouldn't inherit the SOCK_NONBLOCK flag (closes #25471)
https://hg.python.org/cpython/rev/10e044a734f3

New changeset 7577960ea17b by Benjamin Peterson in branch '3.5':
merge 3.4 (#25471)
https://hg.python.org/cpython/rev/7577960ea17b

New changeset 347221cfa224 by Benjamin Peterson in branch 'default':
merge 3.5 (#25471)
https://hg.python.org/cpython/rev/347221cfa224

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25471] socket.recv() blocks while it's gettimeout() returns 0.0

2015-10-25 Thread Alexey Gorshkov

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com