diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2004-08-13 20:06:57 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2004-08-13 20:06:57 (GMT) |
commit | 9d499f2f96197b5a8deeff98228c667adb4b43e6 (patch) | |
tree | bd6fe5040a5a189b13eaf3a8f7ad51d1c36479a9 /Lib | |
parent | b3de2e13baaac7573720c62276984cba13c01c75 (diff) | |
download | cpython-9d499f2f96197b5a8deeff98228c667adb4b43e6.zip cpython-9d499f2f96197b5a8deeff98228c667adb4b43e6.tar.gz cpython-9d499f2f96197b5a8deeff98228c667adb4b43e6.tar.bz2 |
Back out patch #982681
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asyncore.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py index 4fb12f1..f63a83e 100644 --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -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 |