aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2011-11-14 09:25:47 -0800
committerConley Owens <cco3@android.com>2011-11-14 09:25:47 -0800
commit7ecc607ec89212e0f0df11641fa1ede18f5fd6fe (patch)
tree6c9ee266a3586a48ca5b9837c583aabc1f1031e0 /scripts
parentcf6215606320e3702b2120d93dae335829515576 (diff)
downloadsource.android.com-7ecc607ec89212e0f0df11641fa1ede18f5fd6fe.tar.gz
Allow reuse of port 8080
Without this, after stopping the server you have to wait a minute before the port frees up to be used again. Change-Id: Ifad7aaca2c3436b16394eff10568427e8c5631f6
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/micro-httpd.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/micro-httpd.py b/scripts/micro-httpd.py
index 13e35a7b..31ad1ea2 100755
--- a/scripts/micro-httpd.py
+++ b/scripts/micro-httpd.py
@@ -18,5 +18,6 @@ import SimpleHTTPServer, SocketServer, os
PORT = int(os.environ.get('HTTP_PORT', 8080))
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("0.0.0.0", PORT), Handler)
+httpd.allow_reuse_address = True
print "Serving on port %d" % PORT
httpd.serve_forever()