Hi,
I am having trouble recovering  on the client side when a streaming server 
hangs.
I am actually using the gRPC provided 
proto_reflection_descriptor_database.cc as client code.
It uses
stream_->Finish()
to destrtuct and determine if reflection calls succeeded.

However when remote side hangs up, the Finish() call on client side blocks 
forever (to simulate hanging/crashing server, press Ctrl+Z on the server to 
just stop scheduling it).

I tried the following workarounds:
- Use ClientContext to set a deadline. -> Does not work, as deadline 
affects whole stream liefetime (not a keep-alive), which we do not know.
- Before call to Finish() call TryCancel() on the ctx. This works, however 
it overwrites any RPC status, and all streams then end with CANCELLED 
state. No way to tell if RPC failed due to other reason (e.g. UNIMPLEMENTED)

Is there any way to call Finish() without blocking. e.g. something like 
tryFinish() to get any RPC errors, which already are known already? Or give 
a deadline after RPC has started?

Thanks for your help,
Rainer

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/67a5a1c0-fcf9-4217-a829-46619599dd6fn%40googlegroups.com.

Reply via email to