aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/client_async.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/qps/client_async.cc')
-rw-r--r--test/cpp/qps/client_async.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc
index 3fd9628bd9..e4e7e73762 100644
--- a/test/cpp/qps/client_async.cc
+++ b/test/cpp/qps/client_async.cc
@@ -148,7 +148,8 @@ class AsyncUnaryClient GRPC_FINAL : public Client {
int t = 0;
for (int i = 0; i < config.outstanding_rpcs_per_channel(); i++) {
- for (auto& channel : channels_) {
+ for (auto channel = channels_.begin(); channel != channels_.end();
+ channel++) {
auto* cq = cli_cqs_[t].get();
t = (t + 1) % cli_cqs_.size();
auto start_req = [cq](TestService::Stub* stub, grpc::ClientContext* ctx,
@@ -156,7 +157,7 @@ class AsyncUnaryClient GRPC_FINAL : public Client {
return stub->AsyncUnaryCall(ctx, request, cq, tag);
};
- TestService::Stub* stub = channel.get_stub();
+ TestService::Stub* stub = channel->get_stub();
const SimpleRequest& request = request_;
new ClientRpcContextUnaryImpl<SimpleRequest, SimpleResponse>(
stub, request, start_req, check_done);
@@ -169,11 +170,11 @@ class AsyncUnaryClient GRPC_FINAL : public Client {
~AsyncUnaryClient() GRPC_OVERRIDE {
EndThreads();
- for (auto& cq : cli_cqs_) {
- cq->Shutdown();
+ for (auto cq = cli_cqs_.begin(); cq != cli_cqs_.end(); cq++) {
+ (*cq)->Shutdown();
void* got_tag;
bool ok;
- while (cq->Next(&got_tag, &ok)) {
+ while ((*cq)->Next(&got_tag, &ok)) {
delete ClientRpcContext::detag(got_tag);
}
}