There's unfortunately no existing way to do this.

One option is to start a goroutine when creating the stream and do your own 
timeout.

On Saturday, July 24, 2021 at 1:40:45 AM UTC-7 [email protected] wrote:

> For unary RPC method calls, passing a context to the RPC method call
> is an Ok way to ensure that WaitForReady() doesn't hang forever.
> This is however tricky for streaming RPC method call, since setting
> the context also determines how long the entire stream will live for.
>
> Is there a way to implement an upper limit on how long WaitForRead()
> waits for the channel to reach the READY state? I think a dedicated
> goroutine to monitor
> the state of the channel may work such that it is invoked every time
> we have a RPC method call..?
>
> Thanks,
> Amit.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/f2a58120-121a-42ec-bfdc-2539df2ca840n%40googlegroups.com.

Reply via email to