diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index baa8dd36..e596f822 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -184,8 +184,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection + '\u00a7' + legacy.getPlayers().getMax(); } - ch.getHandle().writeAndFlush( kickMessage ); - ch.close(); + ch.close( kickMessage ); } }; diff --git a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java index 2b2d15b3..71df1fd5 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java @@ -54,12 +54,11 @@ public class ChannelWrapper if ( packet instanceof PacketWrapper ) { ( (PacketWrapper) packet ).setReleased( true ); - ch.write( ( (PacketWrapper) packet ).buf, ch.voidPromise() ); + ch.writeAndFlush( ( (PacketWrapper) packet ).buf, ch.voidPromise() ); } else { - ch.write( packet, ch.voidPromise() ); + ch.writeAndFlush( packet, ch.voidPromise() ); } - ch.flush(); } }