geforkt von Mirrors/Velocity
Revert "Merge branch 'feature/flush-consolidation' into dev/1.1.0"
This reverts commitf72f50819d
, reversing changes made to3b9db94ce9
.
Dieser Commit ist enthalten in:
Ursprung
f72f50819d
Commit
e476ee815a
@ -3,14 +3,12 @@ package com.velocitypowered.proxy.connection.backend;
|
|||||||
import static com.velocitypowered.proxy.VelocityServer.GSON;
|
import static com.velocitypowered.proxy.VelocityServer.GSON;
|
||||||
import static com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants.HANDSHAKE_HOSTNAME_TOKEN;
|
import static com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants.HANDSHAKE_HOSTNAME_TOKEN;
|
||||||
import static com.velocitypowered.proxy.network.Connections.FLOW_HANDLER;
|
import static com.velocitypowered.proxy.network.Connections.FLOW_HANDLER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.FLUSH_CONSOLIDATION;
|
|
||||||
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
|
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
|
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.HANDLER;
|
import static com.velocitypowered.proxy.network.Connections.HANDLER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
|
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
|
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.READ_TIMEOUT;
|
import static com.velocitypowered.proxy.network.Connections.READ_TIMEOUT;
|
||||||
import static io.netty.handler.flush.FlushConsolidationHandler.DEFAULT_EXPLICIT_FLUSH_AFTER_FLUSHES;
|
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.velocitypowered.api.network.ProtocolVersion;
|
import com.velocitypowered.api.network.ProtocolVersion;
|
||||||
@ -39,7 +37,6 @@ import io.netty.channel.Channel;
|
|||||||
import io.netty.channel.ChannelFutureListener;
|
import io.netty.channel.ChannelFutureListener;
|
||||||
import io.netty.channel.ChannelInitializer;
|
import io.netty.channel.ChannelInitializer;
|
||||||
import io.netty.handler.flow.FlowControlHandler;
|
import io.netty.handler.flow.FlowControlHandler;
|
||||||
import io.netty.handler.flush.FlushConsolidationHandler;
|
|
||||||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -84,8 +81,6 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
|||||||
@Override
|
@Override
|
||||||
protected void initChannel(Channel ch) throws Exception {
|
protected void initChannel(Channel ch) throws Exception {
|
||||||
ch.pipeline()
|
ch.pipeline()
|
||||||
.addLast(FLUSH_CONSOLIDATION, new FlushConsolidationHandler(
|
|
||||||
DEFAULT_EXPLICIT_FLUSH_AFTER_FLUSHES, true))
|
|
||||||
.addLast(READ_TIMEOUT,
|
.addLast(READ_TIMEOUT,
|
||||||
new ReadTimeoutHandler(server.getConfiguration().getReadTimeout(),
|
new ReadTimeoutHandler(server.getConfiguration().getReadTimeout(),
|
||||||
TimeUnit.MILLISECONDS))
|
TimeUnit.MILLISECONDS))
|
||||||
|
@ -15,7 +15,6 @@ public class Connections {
|
|||||||
public static final String MINECRAFT_DECODER = "minecraft-decoder";
|
public static final String MINECRAFT_DECODER = "minecraft-decoder";
|
||||||
public static final String MINECRAFT_ENCODER = "minecraft-encoder";
|
public static final String MINECRAFT_ENCODER = "minecraft-encoder";
|
||||||
public static final String READ_TIMEOUT = "read-timeout";
|
public static final String READ_TIMEOUT = "read-timeout";
|
||||||
public static final String FLUSH_CONSOLIDATION = "flush-consolidation";
|
|
||||||
|
|
||||||
private Connections() {
|
private Connections() {
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.velocitypowered.proxy.network;
|
package com.velocitypowered.proxy.network;
|
||||||
|
|
||||||
import static com.velocitypowered.proxy.network.Connections.FLUSH_CONSOLIDATION;
|
|
||||||
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
|
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
|
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.LEGACY_PING_DECODER;
|
import static com.velocitypowered.proxy.network.Connections.LEGACY_PING_DECODER;
|
||||||
@ -8,12 +7,12 @@ import static com.velocitypowered.proxy.network.Connections.LEGACY_PING_ENCODER;
|
|||||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
|
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
|
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
|
||||||
import static com.velocitypowered.proxy.network.Connections.READ_TIMEOUT;
|
import static com.velocitypowered.proxy.network.Connections.READ_TIMEOUT;
|
||||||
import static io.netty.handler.flush.FlushConsolidationHandler.DEFAULT_EXPLICIT_FLUSH_AFTER_FLUSHES;
|
|
||||||
|
|
||||||
import com.velocitypowered.proxy.VelocityServer;
|
import com.velocitypowered.proxy.VelocityServer;
|
||||||
import com.velocitypowered.proxy.connection.MinecraftConnection;
|
import com.velocitypowered.proxy.connection.MinecraftConnection;
|
||||||
import com.velocitypowered.proxy.connection.client.HandshakeSessionHandler;
|
import com.velocitypowered.proxy.connection.client.HandshakeSessionHandler;
|
||||||
import com.velocitypowered.proxy.protocol.ProtocolUtils;
|
import com.velocitypowered.proxy.protocol.ProtocolUtils;
|
||||||
|
import com.velocitypowered.proxy.protocol.StateRegistry;
|
||||||
import com.velocitypowered.proxy.protocol.netty.LegacyPingDecoder;
|
import com.velocitypowered.proxy.protocol.netty.LegacyPingDecoder;
|
||||||
import com.velocitypowered.proxy.protocol.netty.LegacyPingEncoder;
|
import com.velocitypowered.proxy.protocol.netty.LegacyPingEncoder;
|
||||||
import com.velocitypowered.proxy.protocol.netty.MinecraftDecoder;
|
import com.velocitypowered.proxy.protocol.netty.MinecraftDecoder;
|
||||||
@ -23,7 +22,6 @@ import com.velocitypowered.proxy.protocol.netty.MinecraftVarintLengthEncoder;
|
|||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
import io.netty.channel.ChannelInitializer;
|
import io.netty.channel.ChannelInitializer;
|
||||||
import io.netty.handler.codec.haproxy.HAProxyMessageDecoder;
|
import io.netty.handler.codec.haproxy.HAProxyMessageDecoder;
|
||||||
import io.netty.handler.flush.FlushConsolidationHandler;
|
|
||||||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -39,8 +37,6 @@ public class ServerChannelInitializer extends ChannelInitializer<Channel> {
|
|||||||
@Override
|
@Override
|
||||||
protected void initChannel(final Channel ch) {
|
protected void initChannel(final Channel ch) {
|
||||||
ch.pipeline()
|
ch.pipeline()
|
||||||
.addLast(FLUSH_CONSOLIDATION, new FlushConsolidationHandler(
|
|
||||||
DEFAULT_EXPLICIT_FLUSH_AFTER_FLUSHES, true))
|
|
||||||
.addLast(READ_TIMEOUT,
|
.addLast(READ_TIMEOUT,
|
||||||
new ReadTimeoutHandler(this.server.getConfiguration().getReadTimeout(),
|
new ReadTimeoutHandler(this.server.getConfiguration().getReadTimeout(),
|
||||||
TimeUnit.MILLISECONDS))
|
TimeUnit.MILLISECONDS))
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren