[Python-bugs-list] [ python-Bugs-620783 ] SocketServer/socket allow_reuse_address
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 14 Oct 2002 20:03:01 -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: Deleted
Resolution: None
Priority: 2
Submitted By: Pat Notz (notz)
Assigned to: Guido van Rossum (gvanrossum)
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").
----------------------------------------------------------------------
>Comment By: Pat Notz (notz)
Date: 2002-10-15 03:03
Message:
Logged In: YES
user_id=8764
I can no longer reproduce the problem and a value of "1"
seems to work again. When I get the chance I'll pull an old
copy of our code out of CVS and try harder to reproduce it but
I'm now thinking that it must have been a different issue with
our code.
I feel dumb, but I honestly remember testing this and doing
so in front of others. Sorry for the inconvenience.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-10-14 20:43
Message:
Logged In: YES
user_id=6380
Are you sure about Linux? I've used this code successfully
on Linux with '1'.
Can you point to documentation that prove your point?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=620783&group_id=5470