mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-26 12:35:11 +01:00
Fixed bedrock pinging not working
This commit is contained in:
parent
b33f2ac5fa
commit
8a51d507bb
@ -86,9 +86,11 @@ public class BedrockProxyConnection extends ProxyConnection {
|
||||
private ChannelFuture ping(final ServerAddress serverAddress) {
|
||||
if (this.channelFuture == null) this.initialize(new Bootstrap());
|
||||
|
||||
this.getChannel().pipeline().replace(VLPipeline.VIABEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, "ping_encapsulation", new PingEncapsulationCodec(serverAddress.toSocketAddress()));
|
||||
this.getChannel().pipeline().remove(VLPipeline.VIABEDROCK_PACKET_ENCAPSULATION_HANDLER_NAME);
|
||||
this.getChannel().pipeline().remove(MCPipeline.SIZER_HANDLER_NAME);
|
||||
this.channelFuture.channel().eventLoop().submit(() -> {
|
||||
this.getChannel().pipeline().replace(VLPipeline.VIABEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, "ping_encapsulation", new PingEncapsulationCodec(serverAddress.toSocketAddress()));
|
||||
this.getChannel().pipeline().remove(VLPipeline.VIABEDROCK_PACKET_ENCAPSULATION_HANDLER_NAME);
|
||||
this.getChannel().pipeline().remove(MCPipeline.SIZER_HANDLER_NAME);
|
||||
});
|
||||
|
||||
return this.getChannel().bind(new InetSocketAddress(0));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user