]> granicus.if.org Git - python/commitdiff
Set HTTPServer class variable allow_reuse_address to 1, so restarting
authorGuido van Rossum <guido@python.org>
Tue, 9 May 2000 14:54:13 +0000 (14:54 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 9 May 2000 14:54:13 +0000 (14:54 +0000)
the server after it died doesn't require a wait period.

Lib/BaseHTTPServer.py

index 10a706e1f8d485d7be56d96a8cad38a11ad08b4d..ea5095a4c285257d49c238439307865677e32238 100644 (file)
@@ -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)