Channel channel = ctx.channel();
Object attribute = Channels.getAttribute(channel);
if (attribute instanceof Callback && msg instanceof LastHttpContent) {
Callback ac = (Callback) attribute;
ac.call();
Channels.setAttribute(channel, DiscardEvent.INSTANCE);
} else if (attribute instanceof NettyResponseFuture) {
NettyResponseFuture<?> future = (NettyResponseFuture<?>) attribute;
protocol.handle(channel, future, msg);