Back out patch #982681

This commit is contained in:
Andrew M. Kuchling 2004-08-13 20:06:57 +00:00
parent b3de2e13ba
commit 9d499f2f96
1 changed files with 2 additions and 8 deletions

View File

@ -263,16 +263,10 @@ class dispatcher:
def set_reuse_addr(self):
# try to re-use a server port if possible
try:
# Windows SO_REUSEADDR is very broken (from a unixy perspective)
if sys.platform == 'win32':
reuse_constant = socket.SO_EXCLUSIVEADDRUSE
else:
reuse_constant = socket.SO_REUSEADDR
self.socket.setsockopt(
socket.SOL_SOCKET, reuse_constant,
socket.SOL_SOCKET, socket.SO_REUSEADDR,
self.socket.getsockopt(socket.SOL_SOCKET,
reuse_constant) | 1
socket.SO_REUSEADDR) | 1
)
except socket.error:
pass