Charles-Francois Natali <neolo...@free.fr> added the comment: That's a non-portable user of listen()'s backlog, see http://www.opengroup.org/onlinepubs/009695399/functions/listen.html: A backlog argument of 0 may allow the socket to accept connections, in which case the length of the listen queue may be set to an implementation-defined minimum value.
Furthermore, python's socket documentation makes it clear: Enable a server to accept connections. The backlog argument must be at least 1; it specifies the number of unaccepted connection that the system will allow before refusing new connections. If you really want to only accept 1 connection (I'm talking of sending back a SYN-ACK, not an accept() call), you can just close the server socket as soon as you've done the accept, and re-open it when you're ready to process another request. Or you could accept new connections and close them immediately (but then you'd send back a SYN-ACK then a FIN). So I'd say it's not a python bug. ---------- assignee: -> tarek components: +Distutils -Extension Modules nosy: +neologix, tarek _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8498> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com