Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test_server.py

Issue 29334529: Issue 3572 - Allowed address reuse for test server (Closed)
Patch Set: Created Jan. 25, 2016, 6:57 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test_server.py
===================================================================
--- a/test_server.py
+++ b/test_server.py
@@ -21,9 +21,12 @@
PORT = ("127.0.0.1", 5000)
-httpd = SocketServer.TCPServer(PORT, SimpleHTTPServer.SimpleHTTPRequestHandler)
+httpd = SocketServer.TCPServer(PORT, SimpleHTTPServer.SimpleHTTPRequestHandler, False)
+httpd.allow_reuse_address = True
saroyanm 2016/01/29 13:38:08 You can declare the allow_reuse_address on the cla
Thomas Greiner 2016/01/29 18:18:55 Done. You're right. Great that you found that.
if __name__ == "__main__":
print "Starting web server at http://%s:%i/" % PORT
os.chdir(os.path.dirname(__file__))
+ httpd.server_bind()
+ httpd.server_activate()
httpd.serve_forever()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld