This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author taleinat
Recipients
Date 2006-07-27.06:54:54
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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...
History
Date User Action Args
2007-08-23 15:43:01adminlinkissue1201569 messages
2007-08-23 15:43:01admincreate