[Python-bugs-list] [ python-Bugs-620783 ] SocketServer/socket allow_reuse_address

noreply@sourceforge.net noreply@sourceforge.net
Wed, 09 Oct 2002 07:18:11 -0700


Bugs item #620783, was opened at 2002-10-09 14:18
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=620783&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Pat Notz (notz)
Assigned to: Nobody/Anonymous (nobody)
Summary: SocketServer/socket allow_reuse_address 

Initial Comment:
The SocketServer.TCPServer.server_bind() method
contains the following code:

        if self.allow_reuse_address:
            self.socket.setsockopt(socket.SOL_SOCKET,
socket.SO_REUSEADDR, 1)
        self.socket.bind(self.server_address)

On SunOS and Linux (possibly others) this only appears
to work if the third argument is changed to "2". 
Perhaps this is also a bug with the lower-level socket
package's setsockopt() function (I mean, perhaps it
*should* work with a value of "1").


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=620783&group_id=5470