public void start(ChannelHandlerContext ctx, ChannelPromise promise) {
        final Channel ch = ctx.channel();
        if (!ch.isActive()) {
            promise.trySuccess();
            return;
        }

        started = true;

        // Ensure the given promise is fulfilled when the channel is closed.
        ch.closeFuture().addListener((ChannelFutureListener) future -> {
            if (future.cause() != null) {
                promise.tryFailure(future.cause());
            } else {
                promise.trySuccess();
            }
        });

        run(ctx);
    }
Code executed on the connection drain end. Executed at most once.
core/src/main/java/com/linecorp/armeria/internal/common/GracefulConnectionShutdownHandler.java