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