summaryrefslogtreecommitdiffstats
path: root/Lib/BaseHTTPServer.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-05-09 14:54:13 (GMT)
committerGuido van Rossum <guido@python.org>2000-05-09 14:54:13 (GMT)
commit18865de7bd91dfcc42f323440aa85e6f36972c72 (patch)
treeb11d77e6e54e09ae65485956de3b1d52eccb639a /Lib/BaseHTTPServer.py
parente3c7a5fbf5b737666a3e1f58f0677ec93e4de032 (diff)
downloadcpython-18865de7bd91dfcc42f323440aa85e6f36972c72.zip
cpython-18865de7bd91dfcc42f323440aa85e6f36972c72.tar.gz
cpython-18865de7bd91dfcc42f323440aa85e6f36972c72.tar.bz2
Set HTTPServer class variable allow_reuse_address to 1, so restarting
the server after it died doesn't require a wait period.
Diffstat (limited to 'Lib/BaseHTTPServer.py')
-rw-r--r--Lib/BaseHTTPServer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py
index 10a706e..ea5095a 100644
--- a/Lib/BaseHTTPServer.py
+++ b/Lib/BaseHTTPServer.py
@@ -87,6 +87,8 @@ DEFAULT_ERROR_MESSAGE = """\
class HTTPServer(SocketServer.TCPServer):
+ allow_reuse_address = 1 # Seems to make sense in testing environment
+
def server_bind(self):
"""Override server_bind to store the server name."""
SocketServer.TCPServer.server_bind(self)