@Override
        public final void onComplete() {
            if (state == State.READY_TO_WRITE) {
                requiredWriteSubscriber().onComplete();
                return;
            }
            synchronized (this) {
                if (state == State.READY_TO_WRITE) {
                    requiredWriteSubscriber().onComplete();
                } else if (state == State.NEW) {
                    completed = true;
                    state = State.FIRST_SIGNAL_RECEIVED;
                    final Publisher<Void> result;
                    try {
                        result = writeFunction.apply(this);
                    } catch (Throwable ex) {
                        writeCompletionBarrier.onError(ex);
                        return;
                    }
                    result.subscribe(writeCompletionBarrier);
                } else {
                    completed = true;
                }
            }
        }
The actual writeSubscriber from the HTTP server adapter.
spring/boot3-webflux-autoconfigure/src/main/java/com/linecorp/armeria/spring/web/reactive/ChannelSendOperator.java