13
0
geforkt von Mirrors/Velocity

Well, this is embarassing.

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-07-24 21:15:07 -04:00
Ursprung c3dcf9b1dd
Commit 2a29813bde

Datei anzeigen

@ -2,6 +2,7 @@ package com.velocitypowered.proxy.network.netty;
import com.google.common.cache.Cache; import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheBuilder;
import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.netty.resolver.AddressResolver; import io.netty.resolver.AddressResolver;
import io.netty.resolver.AddressResolverGroup; import io.netty.resolver.AddressResolverGroup;
@ -56,7 +57,7 @@ public final class SeparatePoolInetNameResolver extends InetNameResolver {
resolveExecutor.execute(() -> { resolveExecutor.execute(() -> {
promise.addListener(future -> { promise.addListener(future -> {
if (future.isSuccess()) { if (future.isSuccess()) {
cache.put(inetHost, (List<InetAddress>) future.getNow()); cache.put(inetHost, ImmutableList.of((InetAddress) future.getNow()));
} }
}); });
this.delegate.resolve(inetHost, promise); this.delegate.resolve(inetHost, promise);