protected final HttpObject responseTrailers(ServiceRequestContext ctx, Status status,
                                                @Nullable Metadata metadata, boolean trailersOnly) {
        final HttpHeadersBuilder defaultTrailers =
                trailersOnly ? defaultResponseHeaders.toBuilder() : HttpHeaders.builder();
        final HttpHeaders trailers = statusToTrailers(ctx, defaultTrailers, status, metadata);
        if (!trailersOnly && GrpcSerializationFormats.isGrpcWeb(serializationFormat)) {
            GrpcWebTrailers.set(ctx, trailers);
            // Normal trailers are not supported in grpc-web and must be encoded as a message.
            final ByteBuf serialized = serializeTrailersAsMessage(ctx.alloc(), trailers);
            return responseFramer.writePayload(serialized, true);
        } else {
            return trailers;
        }
    }
Cancels a call when the call was closed by a client, not by server.
grpc/src/main/java/com/linecorp/armeria/internal/server/grpc/AbstractServerCall.java