@Override
    public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
        if (!closing) {
            closing = true;

            if (needsImmediateDisconnection()) {
                connection().forEachActiveStream(closeAllStreams);
            }
        }

        // Send final GOAWAY frame with the latest stream ID.
        goAway(ctx, connection().remote().lastStreamCreated()).addListener(future -> super.close(ctx, promise));
        ctx.flush();
    }
Sends a {@code GO_AWAY} frame to initiate connection shutdown. No-op if channel isn't active.
Does <strong>not</strong> flush immediately, this is the responsibility of the caller.
core/src/main/java/com/linecorp/armeria/internal/common/AbstractHttp2ConnectionHandler.java