diff options
author | Craig Tiller <ctiller@google.com> | 2017-04-25 10:19:10 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-04-25 10:19:10 -0700 |
commit | 09ebed7bf4c19a8c31195b44c8d911f39779323e (patch) | |
tree | 6797e6ad381ec2f5df733aae6d9c8f27e3ecc33b /tools | |
parent | a27edc69c3e9b957a32f8d89f4969abe6cc37580 (diff) |
Ensure port server can shutdown
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run_tests/python_utils/port_server.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/run_tests/python_utils/port_server.py b/tools/run_tests/python_utils/port_server.py index 522cbed9e1..e96ee0b08c 100755 --- a/tools/run_tests/python_utils/port_server.py +++ b/tools/run_tests/python_utils/port_server.py @@ -46,7 +46,7 @@ import threading # increment this number whenever making a change to ensure that # the changes are picked up by running CI servers # note that all changes must be backwards compatible -_MY_VERSION = 11 +_MY_VERSION = 14 if len(sys.argv) == 2 and sys.argv[1] == 'dump_version': @@ -166,12 +166,11 @@ class Handler(BaseHTTPRequestHandler): elif self.path == '/quitquitquit': self.send_response(200) self.end_headers() - sys.exit(0) + self.server.shutdown() class ThreadedHTTPServer(ThreadingMixIn, HTTPServer): """Handle requests in a separate thread""" -httpd = ThreadedHTTPServer(('', args.port), Handler) -httpd.serve_forever() +ThreadedHTTPServer(('', args.port), Handler).serve_forever() |