mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-24 17:47:41 +01:00
Wrapped buffers are not thread safe.
This commit is contained in:
parent
422e97f495
commit
042f47cbb9
@ -16,16 +16,15 @@ public class PingHandler extends PacketHandler
|
||||
|
||||
private final ServerInfo target;
|
||||
private final Callback<ServerPing> callback;
|
||||
// TODO: Update this to 1.6.2 style!
|
||||
private static final ByteBuf pingBuf = Unpooled.unreleasableBuffer( Unpooled.wrappedBuffer( new byte[]
|
||||
{
|
||||
(byte) 0xFE, (byte) 0x01
|
||||
} ) );
|
||||
|
||||
@Override
|
||||
public void connected(ChannelWrapper channel) throws Exception
|
||||
{
|
||||
channel.write( pingBuf );
|
||||
// TODO: Update this to 1.6.2 style!
|
||||
channel.write( Unpooled.wrappedBuffer( new byte[]
|
||||
{
|
||||
(byte) 0xFE, (byte) 0x01
|
||||
} ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user