#3450: Use readRetainedSlice method instead of slice+retain+skip
This commit is contained in:
parent
7790783949
commit
2e6f0dd442
@ -53,8 +53,7 @@ public class Varint21FrameDecoder extends ByteToMessageDecoder
|
|||||||
{
|
{
|
||||||
if ( in.hasMemoryAddress() )
|
if ( in.hasMemoryAddress() )
|
||||||
{
|
{
|
||||||
out.add( in.slice( in.readerIndex(), length ).retain() );
|
out.add( in.readRetainedSlice( length ) );
|
||||||
in.skipBytes( length );
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if ( !DIRECT_WARNING )
|
if ( !DIRECT_WARNING )
|
||||||
|
Loading…
Reference in New Issue
Block a user