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 ServerInfo target;
|
||||||
private final Callback<ServerPing> callback;
|
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
|
@Override
|
||||||
public void connected(ChannelWrapper channel) throws Exception
|
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
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user