mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-02-18 02:02:30 +01:00
30 seconds of protocol auto detect cache
This commit is contained in:
parent
8dd19d0230
commit
c2b26a1c43
@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit
|
|||||||
|
|
||||||
object ProtocolDetector {
|
object ProtocolDetector {
|
||||||
private val SERVER_VER = CacheBuilder.newBuilder()
|
private val SERVER_VER = CacheBuilder.newBuilder()
|
||||||
.expireAfterAccess(100, TimeUnit.SECONDS)
|
.expireAfterAccess(30, TimeUnit.SECONDS)
|
||||||
.build<InetSocketAddress, CompletableFuture<ProtocolVersion>>(CacheLoader.from { address ->
|
.build<InetSocketAddress, CompletableFuture<ProtocolVersion>>(CacheLoader.from { address ->
|
||||||
val future = CompletableFuture<ProtocolVersion>()
|
val future = CompletableFuture<ProtocolVersion>()
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user