Use newer writeAndFlush method

This commit is contained in:
md_5 2017-08-09 22:05:06 +10:00
parent 828e45651e
commit db266a8484
2 changed files with 3 additions and 5 deletions

View File

@ -184,8 +184,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
+ '\u00a7' + legacy.getPlayers().getMax();
}
ch.getHandle().writeAndFlush( kickMessage );
ch.close();
ch.close( kickMessage );
}
};

View File

@ -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();
}
}