protected final void closeListener(ServerStatusAndMetadata statusAndMetadata) {
        final boolean cancelled = statusAndMetadata.shouldCancel();
        if (!listenerClosed) {
            listenerClosed = true;

            if (!ctx.log().isAvailable(RequestLogProperty.REQUEST_CONTENT)) {
                // Failed to deserialize a message into a request
                ctx.logBuilder().requestContent(GrpcLogUtil.rpcRequest(method, simpleMethodName), null);
            }

            if (!ctx.log().isAvailable(RequestLogProperty.RESPONSE_CONTENT)) {
                ctx.logBuilder().responseContent(GrpcLogUtil.rpcResponse(statusAndMetadata, firstResponse()),
                                                 null);
            }

            if (!clientStreamClosed) {
                clientStreamClosed = true;
                if (statusAndMetadata.status().isOk()) {
                    req.abort();
                } else {
                    req.abort(statusAndMetadata.asRuntimeException());
                }
            }

            if (!cancelled) {
                if (blockingExecutor != null) {
                    blockingExecutor.execute(this::invokeOnComplete);
                } else {
                    invokeOnComplete();
                }
            } else {
                this.cancelled = true;
                if (blockingExecutor != null) {
                    blockingExecutor.execute(this::invokeOnCancel);
                } else {
                    invokeOnCancel();
                }
                // Transport error, not business logic error, so reset the stream.
                if (!closeCalled) {
                    res.abort(statusAndMetadata.asRuntimeException());
                }
            }
        }
    }
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