30 seconds of protocol auto detect cache

This commit is contained in:
creeper123123321 2021-06-20 08:52:52 -03:00 committed by GitHub
parent 8dd19d0230
commit c2b26a1c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit
object ProtocolDetector {
private val SERVER_VER = CacheBuilder.newBuilder()
.expireAfterAccess(100, TimeUnit.SECONDS)
.expireAfterAccess(30, TimeUnit.SECONDS)
.build<InetSocketAddress, CompletableFuture<ProtocolVersion>>(CacheLoader.from { address ->
val future = CompletableFuture<ProtocolVersion>()
try {