mirror of
https://github.com/square/okhttp.git
synced 2025-08-08 23:42:08 +03:00
HappyEyeballs (#7035)
This doesn't yet introduce any mechanism to enable or disable happy eyeballs. It also doesn't sort IP addresses to alternate IPv6, IPv4 for best success. It also doesn't limit how many connections are attempted simultaneously. It also lacks an appropriate number of tests.
This commit is contained in:
@@ -114,9 +114,10 @@ class OkHttpClientTestRule : BeforeEachCallback, AfterEachCallback {
|
||||
var client = testClient
|
||||
if (client == null) {
|
||||
client = OkHttpClient.Builder()
|
||||
.dns(SINGLE_INET_ADDRESS_DNS) // Prevent unexpected fallback addresses.
|
||||
.eventListenerFactory { ClientRuleEventListener(logger = ::addEvent) }
|
||||
.build()
|
||||
.fastFallback(true) // Test this by default, since it'll soon be the default.
|
||||
.dns(SINGLE_INET_ADDRESS_DNS) // Prevent unexpected fallback addresses.
|
||||
.eventListenerFactory { ClientRuleEventListener(logger = ::addEvent) }
|
||||
.build()
|
||||
testClient = client
|
||||
}
|
||||
return client
|
||||
|
Reference in New Issue
Block a user