From: Guido van Rossum Date: Tue, 9 May 2000 14:54:13 +0000 (+0000) Subject: Set HTTPServer class variable allow_reuse_address to 1, so restarting X-Git-Tag: v2.0b1~1797 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18865de7bd91dfcc42f323440aa85e6f36972c72;p=python Set HTTPServer class variable allow_reuse_address to 1, so restarting the server after it died doesn't require a wait period. --- diff --git a/Lib/BaseHTTPServer.py b/Lib/BaseHTTPServer.py index 10a706e1f8..ea5095a4c2 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)