| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -129,7 +129,8 @@ | |||
| 129 | 129 | ||
| 130 | 130 | class HTTPServer(socketserver.TCPServer): | |
| 131 | 131 | ||
| 132 | - allow_reuse_address = 1 # Seems to make sense in testing environment | ||
| 132 | + allow_reuse_address = True # Seems to make sense in testing environment | ||
| 133 | + allow_reuse_port = True | ||
| 133 | 134 | ||
| 134 | 135 | def server_bind(self): | |
| 135 | 136 | """Override server_bind to store the server name.""" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -984,7 +984,8 @@ class ConfigSocketReceiver(ThreadingTCPServer): | |||
| 984 | 984 | A simple TCP socket-based logging config receiver. | |
| 985 | 985 | """ | |
| 986 | 986 | ||
| 987 | - allow_reuse_address = 1 | ||
| 987 | + allow_reuse_address = True | ||
| 988 | + allow_reuse_port = True | ||
| 988 | 989 | ||
| 989 | 990 | def __init__(self, host='localhost', port=DEFAULT_LOGGING_CONFIG_PORT, | |
| 990 | 991 | handler=None, ready=None, verify=None): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1038,6 +1038,7 @@ class TestTCPServer(ControlMixin, ThreadingTCPServer): | |||
| 1038 | 1038 | """ | |
| 1039 | 1039 | ||
| 1040 | 1040 | allow_reuse_address = True | |
| 1041 | + allow_reuse_port = True | ||
| 1041 | 1042 | ||
| 1042 | 1043 | def __init__(self, addr, handler, poll_interval=0.5, | |
| 1043 | 1044 | bind_and_activate=True): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -578,6 +578,7 @@ class SimpleXMLRPCServer(socketserver.TCPServer, | |||
| 578 | 578 | """ | |
| 579 | 579 | ||
| 580 | 580 | allow_reuse_address = True | |
| 581 | + allow_reuse_port = True | ||
| 581 | 582 | ||
| 582 | 583 | # Warning: this is for debugging purposes only! Never set this to True in | |
| 583 | 584 | # production code, as will be sending out sensitive information (exception | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + Add an override of ``allow_reuse_port`` on classes subclassing ``socketserver.TCPServer`` where ``allow_reuse_address`` is also overridden. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments