Commit dc53049a authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Updated dependencies

parent c7427728
...@@ -124,7 +124,7 @@ dependencies { ...@@ -124,7 +124,7 @@ dependencies {
implementation 'com.frostnerd.utilskt:preferences:1.5.17' // https://git.frostnerd.com/AndroidUtils/preferenceskt implementation 'com.frostnerd.utilskt:preferences:1.5.17' // https://git.frostnerd.com/AndroidUtils/preferenceskt
implementation 'com.frostnerd.utilskt:navigationdraweractivity:1.3.29' // https://git.frostnerd.com/AndroidUtils/navigationdraweractivity implementation 'com.frostnerd.utilskt:navigationdraweractivity:1.3.29' // https://git.frostnerd.com/AndroidUtils/navigationdraweractivity
implementation 'com.frostnerd.utilskt:encrypteddnstunnelproxy:1.5.183' // https://git.frostnerd.com/AndroidUtils/encrypteddnstunnelproxy implementation 'com.frostnerd.utilskt:encrypteddnstunnelproxy:1.5.184' // https://git.frostnerd.com/AndroidUtils/encrypteddnstunnelproxy
implementation 'com.frostnerd.utilskt:general:1.0.19' // https://git.frostnerd.com/AndroidUtils/generalkt implementation 'com.frostnerd.utilskt:general:1.0.19' // https://git.frostnerd.com/AndroidUtils/generalkt
implementation 'com.frostnerd.utilskt:adapters:1.1.6' // https://git.frostnerd.com/AndroidUtils/Adapters implementation 'com.frostnerd.utilskt:adapters:1.1.6' // https://git.frostnerd.com/AndroidUtils/Adapters
......
...@@ -63,7 +63,12 @@ class DnsSpeedTest(val server: DnsServerInformation<*>, ...@@ -63,7 +63,12 @@ class DnsSpeedTest(val server: DnsServerInformation<*>,
}) })
} }
private val connectionPool = ConcurrentHashMap<TLSUpstreamAddress, ObjectPool<Socket>>() private val connectionPool = ConcurrentHashMap<TLSUpstreamAddress, ObjectPool<Socket>>()
private lateinit var poolConfig:PoolConfig private var poolConfig:PoolConfig = PoolConfig().apply {
this.maxSize = 1
this.minSize = 1
this.partitionSize = 1
this.maxIdleMilliseconds = 60*1000*5
}
private val poolFactory = object: ObjectFactory<Socket> { private val poolFactory = object: ObjectFactory<Socket> {
private val sslSocketFactory = SSLSocketFactory.getDefault() private val sslSocketFactory = SSLSocketFactory.getDefault()
...@@ -91,12 +96,6 @@ class DnsSpeedTest(val server: DnsServerInformation<*>, ...@@ -91,12 +96,6 @@ class DnsSpeedTest(val server: DnsServerInformation<*>,
*/ */
fun runTest(@IntRange(from = 1) passes: Int): Int? { fun runTest(@IntRange(from = 1) passes: Int): Int? {
var ttl = 0 var ttl = 0
poolConfig = PoolConfig().apply {
this.maxSize = 2
this.minSize = 1
this.partitionSize = 1
this.maxIdleMilliseconds = 60*1000*5
}
for (i in 0 until passes) { for (i in 0 until passes) {
if (server is HttpsDnsServerInformation) { if (server is HttpsDnsServerInformation) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment