btbam91
btbam91

Reputation: 608

gRPC client keeps crashing when reading server stream

I am following the ListFeatures() example in this tutorial: https://github.com/grpc/grpc/blob/v1.31.0/examples/cpp/route_guide/route_guide_client.cc

My server is in Java and my client application is in c++.

I have both the server and the client running locally. What I am observing is that my application crashes when I try to read the stream response via `reader->Read(&feature). I can verify that the server receives the api call and is sending responses back. I am also able to successfully hit the server from bloomRPC.

Any ideas why I can't receive responses in my c++ client application?

Much appreciated!

Upvotes: 1

Views: 1120

Answers (1)

Ted
Ted

Reputation: 21

I had this problem when the context used to create the ClientReader fell out of scope. The context needs to be persistent while the ClientReader is in use.

Upvotes: 2

Related Questions