Make use of the existance of bridge references to find a buffer

This commit is contained in:
Trustin Lee 2012-06-04 11:18:48 -07:00
parent c8c577efc5
commit 1a9c0fd569

View File

@ -621,8 +621,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
if (ctx == null) { if (ctx == null) {
return false; return false;
} }
ChannelBufferHolder<Object> in = ctx.in; if (ctx.inByteBridge != null) {
if (in != null && !in.isBypass() && in.hasByteBuffer()) {
return true; return true;
} }
ctx = ctx.next; ctx = ctx.next;
@ -634,8 +633,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
if (ctx == null) { if (ctx == null) {
return false; return false;
} }
ChannelBufferHolder<Object> in = ctx.inbound(); if (ctx.inMsgBridge != null) {
if (in != null && !in.isBypass() && in.hasMessageBuffer()) {
return true; return true;
} }
ctx = ctx.next; ctx = ctx.next;
@ -699,8 +697,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
return false; return false;
} }
ChannelBufferHolder<Object> out = ctx.outbound(); if (ctx.outByteBridge != null) {
if (out != null && !out.isBypass() && out.hasByteBuffer()) {
return true; return true;
} }
ctx = ctx.prev; ctx = ctx.prev;
@ -713,8 +710,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
return false; return false;
} }
ChannelBufferHolder<Object> out = ctx.outbound(); if (ctx.outMsgBridge != null) {
if (out != null && !out.isBypass() && out.hasMessageBuffer()) {
return true; return true;
} }
ctx = ctx.prev; ctx = ctx.prev;