Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-25 07:40:13 +01:00
Reduce erroneous DNS lookups for Velocity in Kubernetes.
Dieser Commit ist enthalten in:
Ursprung
961e3ece27
Commit
8517d58673
@ -11,8 +11,8 @@ import io.netty.channel.ChannelFutureListener;
|
|||||||
import io.netty.channel.ChannelOption;
|
import io.netty.channel.ChannelOption;
|
||||||
import io.netty.channel.EventLoopGroup;
|
import io.netty.channel.EventLoopGroup;
|
||||||
import io.netty.channel.WriteBufferWaterMark;
|
import io.netty.channel.WriteBufferWaterMark;
|
||||||
import io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider;
|
|
||||||
import io.netty.resolver.dns.DnsAddressResolverGroup;
|
import io.netty.resolver.dns.DnsAddressResolverGroup;
|
||||||
|
import io.netty.resolver.dns.DnsNameResolverBuilder;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -48,8 +48,13 @@ public final class ConnectionManager {
|
|||||||
this.workerGroup = this.transportType.createEventLoopGroup(TransportType.Type.WORKER);
|
this.workerGroup = this.transportType.createEventLoopGroup(TransportType.Type.WORKER);
|
||||||
this.serverChannelInitializer = new ServerChannelInitializerHolder(
|
this.serverChannelInitializer = new ServerChannelInitializerHolder(
|
||||||
new ServerChannelInitializer(this.server));
|
new ServerChannelInitializer(this.server));
|
||||||
this.resolverGroup = new DnsAddressResolverGroup(this.transportType.datagramChannelClass,
|
this.resolverGroup = new DnsAddressResolverGroup(
|
||||||
DefaultDnsServerAddressStreamProvider.INSTANCE);
|
new DnsNameResolverBuilder()
|
||||||
|
.channelType(this.transportType.datagramChannelClass)
|
||||||
|
.ttl(300, 86400)
|
||||||
|
.negativeTtl(15)
|
||||||
|
.ndots(1)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logChannelInformation() {
|
public void logChannelInformation() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren