Hi all,
I am trying to use grpc for a new project. The service is in java and the
client in python. I have questions about exception handling and timeouts.
A grpc call seemed to get stuck. The client wasn't getting a response and
the server didn't seem to do anything. This particular call uses client ->
server streaming. Turned out that a RuntimeException was thrown in onNext()
method and was not caught, so neither onError() nor onCompleted() ended up
getting called. I changed the code to do the following:
@Override
public void onNext(...) {
try {
// do stuff
} catch (Exception ex) {
responseObserver.onError(ex);
}
}
This fixed the problem, but it raised the following questions:
1. Do I really need to catch all exceptions and explicitly call onError() ?
Uncaught exception does not abort the call?
2. I would expect the call to time out at some point. It would be really
*really* undesirable to leave both the client and the server in a zombie
state. The timeout does not seem to be happening.
Please advise. Thanks.
Eugene
--
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].
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/e446627a-da9a-442f-a1de-a17619199576%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.