Skip to content

Commit

Permalink
Fix timeout on async server shutdown
Browse files Browse the repository at this point in the history
Server was continuing to make requests for new calls forever, which were
starving out the shutdown sequence. Change order and win.
  • Loading branch information
ctiller committed May 23, 2016
1 parent 8c2d373 commit e67f7b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/cpp/qps/server_async.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit e67f7b6

Please sign in to comment.