aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/server_async.cc
diff options
context:
space:
mode:
authorGravatar Ken Payson <kpayson@google.com>2017-10-27 02:48:15 -0700
committerGravatar Ken Payson <kpayson@google.com>2017-10-27 02:48:15 -0700
commit918ce7a686fee457d43820db980832e94b46d4a9 (patch)
tree6d1e86c14b76c57338e1f9f9f6a10e99517fe86a /test/cpp/qps/server_async.cc
parentbf3f4be8f3b841ff2bd2fc0b8b11597580776568 (diff)
Fix QPS Async Client Next loop
Diffstat (limited to 'test/cpp/qps/server_async.cc')
-rw-r--r--test/cpp/qps/server_async.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 4cf80e9e3d..1c1a5636a9 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -206,13 +206,12 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
return;
}
ServerRpcContext *ctx;
- std::mutex *mu_ptr;
+ std::mutex *mu_ptr = &shutdown_state_[thread_idx]->mutex;
do {
ctx = detag(got_tag);
// The tag is a pointer to an RPC context to invoke
// Proceed while holding a lock to make sure that
// this thread isn't supposed to shut down
- mu_ptr = &shutdown_state_[thread_idx]->mutex;
mu_ptr->lock();
if (shutdown_state_[thread_idx]->shutdown) {
mu_ptr->unlock();