aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/bad_client
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-01-24 14:33:46 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2018-01-24 14:33:46 -0800
commitb9a34339a7109c59eb268d20b91e2bc29952ad9e (patch)
tree8cf38929583cda5af7630b95edeb84793423589f /test/core/bad_client
parentea318b6825be34c5a976755de9df03327fbccb0e (diff)
Make the thread wait so that write can complete too
Diffstat (limited to 'test/core/bad_client')
-rw-r--r--test/core/bad_client/bad_client.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc
index 0f586f14f1..f5fb82e5f0 100644
--- a/test/core/bad_client/bad_client.cc
+++ b/test/core/bad_client/bad_client.cc
@@ -146,7 +146,8 @@ void grpc_run_client_side_validator(grpc_bad_client_arg* arg, uint32_t flags,
client_cq, grpc_timeout_milliseconds_to_deadline(100),
nullptr)
.type == GRPC_QUEUE_TIMEOUT);
- } while (!gpr_event_get(&read_done_event));
+ } while (!gpr_event_get(&read_done_event) ||
+ !gpr_event_get(&done_write));
if (arg->client_validator(&incoming, arg->client_validator_arg)) break;
gpr_log(GPR_INFO,
"client validator failed; trying additional read "
@@ -156,6 +157,7 @@ void grpc_run_client_side_validator(grpc_bad_client_arg* arg, uint32_t flags,
}
grpc_core::ExecCtx::Get()->Flush();
}
+
grpc_slice_buffer_destroy_internal(&outgoing);
grpc_core::ExecCtx::Get()->Flush();
}