diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 7c89a35ee7ed6fec52a23776700a88e6a44e86e4..e1e44f9ac0da8566d387de66ab782c76c1d185bd 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -201,7 +201,7 @@ class AsyncClient : public Client { } // Now clear out all the pre-allocated idle contexts for (int ch = 0; ch < channel_count_; ch++) { - if (!contexts_[ch].empty()) { + while (!contexts_[ch].empty()) { // Get an idle context from the front of the list auto* ctx = *(contexts_[ch].begin()); contexts_[ch].pop_front();