aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-05-23 14:50:24 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-05-23 14:50:24 -0700
commite67f7b6b5424fe398e675d5d6ce8c4a0949da7e0 (patch)
tree4a0cd1a289618fd06ab8e1b4dfcf2f07aeecdcd6 /test/cpp
parent8c2d373acae9c89bc73f3b2f7b0c0336a944e7ab (diff)
Fix timeout on async server shutdown
Server was continuing to make requests for new calls forever, which were starving out the shutdown sequence. Change order and win.
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/qps/server_async.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 1234542687..1eddb1dc1d 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -131,10 +131,10 @@ class AsyncQpsServerTest : public Server {
}
}
~AsyncQpsServerTest() {
- server_->Shutdown();
for (auto ss = shutdown_state_.begin(); ss != shutdown_state_.end(); ++ss) {
(*ss)->set_shutdown();
}
+ server_->Shutdown();
for (auto thr = threads_.begin(); thr != threads_.end(); thr++) {
thr->join();
}