Message48349
Logged In: YES
user_id=1330769
My patch is not so much a hack, it's actually a more optimal
implementation, with or without the Windows issue. It just
also happens to make port collision very rare ;) Aren't
coincidences wonderful?
</sleepy attempt at humor>
Anyways, I remember seeing something about "reuse address"
when binding sockets... ah, here it is. Check out
SocketServer.py:
if self.allow_reuse_address:
self.socket.setsockopt(socket.SOL_SOCKET,
socket.SO_REUSEADDR, 1)
self.socket.bind(self.server_address)
And this comment in BaseHTTPServer.py:
allow_reuse_address = 1 # Seems to make sense in testing
environment
Could socket.SO_REUSEADDR be the cause? What does it default
to? Maybe its implementation on Windows is broken? (Probably
not, but still worth checking.)
Maybe we should get the discussion up and running again in
Python-Dev or c.l.p... |
|
Date |
User |
Action |
Args |
2007-08-23 15:43:01 | admin | link | issue1201569 messages |
2007-08-23 15:43:01 | admin | create | |
|