Message103957
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. |
|
Date |
User |
Action |
Args |
2010-04-22 12:00:32 | neologix | set | recipients:
+ neologix, exarkun, tarek, Daniel.Evers |
2010-04-22 12:00:31 | neologix | set | messageid: <1271937631.54.0.476813065765.issue8498@psf.upfronthosting.co.za> |
2010-04-22 12:00:30 | neologix | link | issue8498 messages |
2010-04-22 12:00:27 | neologix | create | |
|