From c9174e0733b21dd028f4cf932b30f4ca1c13fea0 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 24 Aug 2012 17:22:14 +0900 Subject: [PATCH] Prefer discardSomeReadBytes() --- .../java/io/netty/channel/ChannelInboundByteHandlerAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/src/main/java/io/netty/channel/ChannelInboundByteHandlerAdapter.java b/transport/src/main/java/io/netty/channel/ChannelInboundByteHandlerAdapter.java index 89f6d6a625..85aaafbe10 100644 --- a/transport/src/main/java/io/netty/channel/ChannelInboundByteHandlerAdapter.java +++ b/transport/src/main/java/io/netty/channel/ChannelInboundByteHandlerAdapter.java @@ -34,7 +34,7 @@ public abstract class ChannelInboundByteHandlerAdapter inboundBufferUpdated(ctx, in); } finally { if (!in.readable()) { - in.discardReadBytes(); + in.unsafe().discardSomeReadBytes(); } } }