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

Unified Diff: chrome/test/chromedriver/server/chromedriver_server.cc

Issue 1879863002: Reland of [chromedriver] Listen on IPv6 on IPv6-only hosts (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better logging Created 4 years, 8 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 | « chrome/test/chromedriver/net/websocket.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/server/chromedriver_server.cc
diff --git a/chrome/test/chromedriver/server/chromedriver_server.cc b/chrome/test/chromedriver/server/chromedriver_server.cc
index 16c09593ebed9abc5cc1afe944537f818dddc920..3fb0cbd053c32e6d4d6732205ed93496bb15953e 100644
--- a/chrome/test/chromedriver/server/chromedriver_server.cc
+++ b/chrome/test/chromedriver/server/chromedriver_server.cc
@@ -77,11 +77,14 @@ class HttpServer : public net::HttpServer::Delegate {
std::unique_ptr<net::ServerSocket> server_socket(
new net::TCPServerSocket(NULL, net::NetLog::Source()));
if (ListenOnIPv4(server_socket.get(), port, allow_remote) != net::OK) {
- // If we fail to listen on IPv4, try using an IPv6 address. This will work
- // on an IPv6-only host, but we will be IPv4-only on dual-stack hosts.
+ // This will work on an IPv6-only host, but we will be IPv4-only on
+ // dual-stack hosts.
// TODO(samuong): change this to listen on both IPv4 and IPv6.
- if (ListenOnIPv6(server_socket.get(), port, allow_remote) != net::OK)
+ VLOG(0) << "listen on IPv4 failed, trying IPv6";
+ if (ListenOnIPv6(server_socket.get(), port, allow_remote) != net::OK) {
+ VLOG(1) << "listen on both IPv4 and IPv6 failed, giving up";
return false;
+ }
}
server_.reset(new net::HttpServer(std::move(server_socket), this));
net::IPEndPoint address;
« no previous file with comments | « chrome/test/chromedriver/net/websocket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698