Bug 1452028 - Bring back network.http.fast-fallback-to-IPv4 preference, regression from bug 1430659. r=valentin
authorHonza Bambas <honzab.moz@firemni.cz>
Fri, 13 Apr 2018 10:04:00 -0400
changeset 466900 10a300d81060300bbedb3a870c7852b87738a87d
parent 466899 a1d4a3e6c77a29e7e63d5e88f5b4859b113df943
child 466901 1908cd8ed88dd4f77a99dff39c193d7d3f435195
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1452028, 1430659
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452028 - Bring back network.http.fast-fallback-to-IPv4 preference, regression from bug 1430659. r=valentin
netwerk/protocol/http/nsHttpConnectionMgr.cpp
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -4082,17 +4082,17 @@ nsHalfOpenSocket::SetupStreams(nsISocket
         tmpFlags |= nsISocketTransport::RETRY_WITH_DIFFERENT_IP_FAMILY;
 
         // From the same reason, let the backup socket fail faster to try the other family.
         uint16_t fallbackTimeout = isBackup ? gHttpHandler->GetFallbackSynTimeout() : 0;
         if (fallbackTimeout) {
             socketTransport->SetTimeout(nsISocketTransport::TIMEOUT_CONNECT,
                                         fallbackTimeout);
         }
-    } else if (isBackup) {
+    } else if (isBackup && gHttpHandler->FastFallbackToIPv4()) {
         // For backup connections, we disable IPv6. That's because some users have
         // broken IPv6 connectivity (leading to very long timeouts), and disabling
         // IPv6 on the backup connection gives them a much better user experience
         // with dual-stack hosts, though they still pay the 250ms delay for each new
         // connection. This strategy is also known as "happy eyeballs".
         tmpFlags |= nsISocketTransport::DISABLE_IPV6;
     }