mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Set HTTPServer class variable allow_reuse_address to 1, so restarting
the server after it died doesn't require a wait period.
This commit is contained in:
parent
e3c7a5fbf5
commit
18865de7bd
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue