channelGroup不是会自动移除断开连接的channel吗?在channelInactive方法中移除channel是否多余?
public void channelInactive(ChannelHandlerContext ctx) throws Exception { NettyConfig.channelGroup.remove(ctx.channel()); }
public void channelInactive(ChannelHandlerContext ctx) throws Exception { NettyConfig.channelGroup.remove(ctx.channel()); }
2020-01-06
举报