Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: tools/telemetry/telemetry/temporary_http_server.py

Issue 12052024: [Telemetry] Dynamically set remote debugging port in DesktopBrowserBackend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/GetLocalPort/GetAvailableLocalPort/ Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/desktop_browser_backend.py ('k') | tools/telemetry/telemetry/util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/temporary_http_server.py
diff --git a/tools/telemetry/telemetry/temporary_http_server.py b/tools/telemetry/telemetry/temporary_http_server.py
index 9eb1dc3729ce68c000e21db55bd937088fa07594..59edbd28c8737490cfffc3a9d9087d785a2e2bd3 100644
--- a/tools/telemetry/telemetry/temporary_http_server.py
+++ b/tools/telemetry/telemetry/temporary_http_server.py
@@ -16,11 +16,7 @@ class TemporaryHTTPServer(object):
self._path = path
self._forwarder = None
- tmp = socket.socket()
- tmp.bind(('', 0))
- port = tmp.getsockname()[1]
- tmp.close()
- self._host_port = port
+ self._host_port = util.GetAvailableLocalPort()
assert os.path.exists(path), path
assert os.path.isdir(path), path
« no previous file with comments | « tools/telemetry/telemetry/desktop_browser_backend.py ('k') | tools/telemetry/telemetry/util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698