Remove all uses of (mark|reset)ReaderIndex()
This is removed in Netty 5.x: netty/netty#8636
This commit is contained in:
@@ -16,12 +16,12 @@ public class MinecraftVarintFrameDecoder extends ByteToMessageDecoder {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
in.markReaderIndex();
|
int origReaderIndex = in.readerIndex();
|
||||||
|
|
||||||
byte[] lenBuf = new byte[3];
|
byte[] lenBuf = new byte[3];
|
||||||
for (int i = 0; i < lenBuf.length; i++) {
|
for (int i = 0; i < lenBuf.length; i++) {
|
||||||
if (!in.isReadable()) {
|
if (!in.isReadable()) {
|
||||||
in.resetReaderIndex();
|
in.readerIndex(origReaderIndex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ public class MinecraftVarintFrameDecoder extends ByteToMessageDecoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (in.readableBytes() < packetLength) {
|
if (in.readableBytes() < packetLength) {
|
||||||
in.resetReaderIndex();
|
in.readerIndex(origReaderIndex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user