Fix not forwarding channelReadComplete events in some cases
This commit is contained in:
@@ -62,10 +62,14 @@ public class AutoReadHolderHandler extends ChannelDuplexHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
|
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
|
||||||
if (this.queuedMessages.isEmpty()) {
|
if (ctx.channel().config().isAutoRead()) {
|
||||||
|
if (!this.queuedMessages.isEmpty()) {
|
||||||
|
this.drainQueuedMessages(ctx); // will also call fireChannelReadComplete()
|
||||||
|
} else {
|
||||||
ctx.fireChannelReadComplete();
|
ctx.fireChannelReadComplete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
|
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
|
||||||
|
Reference in New Issue
Block a user