private Mono<Void> cleanup(@Nullable Throwable cause) {
        if (future.isDone()) {
            return Mono.empty();
        }

        if (cause != null) {
            future.completeExceptionally(cause);
            logger.debug("{} Response future has been completed with a cause", ctx, cause);
            return Mono.empty();
        }

        final HttpResponse response = HttpResponse.of(armeriaHeaders);
        future.complete(response);
        logger.debug("{} Response future has been completed with an HttpResponse", ctx);
        return Mono.fromFuture(response.completionFuture());
    }
private Mono < Void > cleanup ( @ Nullable Throwable cause ) { if ( future . isDone ( ) ) { return Mono . empty ( ) ; } if ( cause != null ) { future . completeExceptionally ( cause ) ; logger . debug ( "{} Response future has been completed with a cause" , ctx , cause ) ; return Mono . empty ( ) ; } final HttpResponse response = HttpResponse . of ( armeriaHeaders ) ; future . complete ( response ) ; logger . debug ( "{} Response future has been completed with an HttpResponse" , ctx ) ; return Mono . fromFuture ( response . completionFuture ( ) ) ; }
Closes the {@link HttpResponseWriter} if it is opened.