@Override public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { Channel channel = ctx.getChannel(); if (!sessions.removeSession(channel.getId())) { Log.error("删除Session失败! sockId: " + channel.getId()); } }