我不确定AbstractOioByteChannel.doWrite(ChannelOutboundBuffer in)中的无限循环是否正确,netty版本4.0.9 谢谢, -Igor
答案 0 :(得分:0)
如果没有消息
,您似乎需要添加循环中断(下面加粗) *for (;;) {
Object msg = in.current();
**if (msg == null) {
break;
}**
if (msg instanceof ByteBuf) {
....
} else if (msg instanceof FileRegion) {
...
} else {
in.remove(new UnsupportedOperationException(
"unsupported message type: " + StringUtil.simpleClassName(msg)));
}
}*