Taking a look at the C API, it looks like IsCancelled() will be true "if 
the call failed in any way". See here 
<https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/grpc_types.h#L597>
.

There is not an API method to determine more info about error, but that 
should be available by examining logs. (setting GRPC_VERBOSITY=debug and 
GRPC_TRACE=all)

On Wednesday, March 28, 2018 at 11:45:36 AM UTC-7, Okke Hendriks wrote:
>
> Hello,
>
> I am using the sync grpc C++ API v1.10.0.
>
> Could someone explain to me what the exact behaviour of IsCancelled() 
> <https://grpc.io/grpc/cpp/classgrpc_1_1_server_context.html#acea4ed6d22ccf89185194310935e2966>
>  is?
>
> Does it evaluate to true if and only if the client sends a TryCancel() 
> which was received by the server? 
> Or also if a call/stream closed due to another reason (socket closed, OS 
> error, etc.)?
>
> If it is NOT the case that it only returns true when a client cancelled, 
> is there a way to find the reason of the cancellation, aka the status?
>
> Kind regards,
>
> Okke Hendriks
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/b80bedc3-4718-4d5f-9202-885affadd32d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to