aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/cpp/helloworld/greeter_async_client.cc
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2016-06-10 09:24:40 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2016-06-10 09:24:40 -0700
commit11e3c07616fdbf4576969334e0cf57680b2dd3fd (patch)
tree730c8dfb2a5190d3e8c5d799c7520bb5790e4eab /examples/cpp/helloworld/greeter_async_client.cc
parent492fd961824447e7f12974893dd9bbf37291e5cc (diff)
parent698d3e91ff42db3fe640cc369e8edf85abc5343d (diff)
Merge branch 'master' into epoll_changes
Diffstat (limited to 'examples/cpp/helloworld/greeter_async_client.cc')
-rw-r--r--examples/cpp/helloworld/greeter_async_client.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc
index c1f5eb55f0..33de59fb95 100644
--- a/examples/cpp/helloworld/greeter_async_client.cc
+++ b/examples/cpp/helloworld/greeter_async_client.cc
@@ -87,7 +87,9 @@ class GreeterClient {
void* got_tag;
bool ok = false;
// Block until the next result is available in the completion queue "cq".
- cq.Next(&got_tag, &ok);
+ // The return value of Next should always be checked. This return value
+ // tells us whether there is any kind of event or the cq_ is shutting down.
+ GPR_ASSERT(cq.Next(&got_tag, &ok));
// Verify that the result from "cq" corresponds, by its tag, our previous
// request.