Просмотр исходного кода

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.
Craig Tiller 9 лет назад
Родитель
Сommit
e67f7b6b54
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      test/cpp/qps/server_async.cc

+ 1 - 1
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();
     }