to /Library/Python/2.5/site-packages/Paste-1.7.1-py2.5.egg/paste/httpserver.py, line 360, immediately after this line: self.socket = socket.socket(self.address_family,
self.socket_type)
This sets the REUSEADDR flag on the socket, which allows it to keep the original port it started out with.]]>
tag:selfsolved.com,2005:Array/69923141564820yliu
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/SocketServer.py, line 323:
allow_reuse_address = False
and set it to True instead.
This will then affect line 341: if self.allow_reuse_address:
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
and force the application of the SO_REUSEADDR flag to any socket. This changes the fundamental way socket servers behave in Python, so it's kind of heavy-handed.]]>