Any advice here would be appreciated.

Thanks,
~ Scott Devoid

On Mon, Jun 6, 2016 at 5:59 PM, Scott Devoid <[email protected]> wrote:
> Hi,
>
> I have a few questions about how gRPC cancellation works in Golang:
>
> First, what are the conditions under which a request could be
> cancelled? I can think of a two but let me know if I am missing some
> or incorrect:
>
> - client cancels context.Context passed into request.
> - TCP socket closes after a timeout?
> - HTTP/2 client/server sends RST_STREAM for...reasons?
>
> Second, if the client cancels the context, is the server notified
> about this (assuming no loss of connectivity)? Can I select on
> req.Context().Done() and perform some clean-up work after the fact or
> does the request handler immediately return?
>
> Third, in one of our bidirectional gRPC methods[1] we see a 'stream
> error: code = 1 desc = "context cancelled"' event. However the client
> passed in a context.Background() to the request so as far as I can
> tell this cancellation has to be happening in grpc internals some
> place. Does anyone know what is going on here?
>
> Thanks!
>
> ~ Scott Devoid
>
> [1] rpc Foo(stream Req) returns (stream Resp) {}

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAJrQjSvfh9EjS5MFDrcbnoj701sFrx9utysrWf3jzHYvEwkrZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to