public void handleInitiateConnectionShutdown(ChannelHandlerContext ctx, InitiateConnectionShutdown event) {
        // If the given duration is negative - fallback to the default duration set in the constructor.
        if (event.hasCustomDrainDuration()) {
            // This value will be used to schedule or update the graceful connection shutdown drain duration.
            drainDurationMicros = event.drainDurationMicros();
        }

        if (started) {
            // Maybe reschedule drain end.
            run(ctx);
        } else {
            // Shutdown not started yet, close the channel to trigger start().
            final Channel ch = ctx.channel();
            if (ch.isActive()) {
                ch.close();
            }
        }
    }
Code executed on the connection drain end. Executed at most once.
core/src/main/java/com/linecorp/armeria/internal/common/GracefulConnectionShutdownHandler.java