private ChannelPromise shouldCloseAfter(ChannelHandlerContext ctx, Channel parent) {
        ChannelPromise closeAfterPromise = ctx.channel()
                .attr(ConnectionCloseChannelAttributes.CLOSE_AFTER_RESPONSE)
                .get();
        if (closeAfterPromise == null) {
            closeAfterPromise = parent.attr(ConnectionCloseChannelAttributes.CLOSE_AFTER_RESPONSE)
                    .get();
        }
        return closeAfterPromise;
    }
Look on both the stream channel, and the parent channel to see if the CLOSE_AFTER_RESPONSE flag has been set.
If so, return that promise.

@param ctx
@param parent
@return
zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionCloseHandler.java