cancel

Available in a dev version: 0․11․0-grpc-186

How to configure

abstract fun cancel(message: String, cause: Throwable? = null): Nothing(source)

Cancel the call locally, providing a human-readable message and an optional cause. This method won't return and abort all further processing.

We made cancel throw a kotlinx.rpc.grpc.GrpcStatusException instead of returning, so control flow is explicit and race conditions between interceptors and the transport layer are avoided.