diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-01-24 14:33:46 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-01-24 14:33:46 -0800 |
commit | b9a34339a7109c59eb268d20b91e2bc29952ad9e (patch) | |
tree | 8cf38929583cda5af7630b95edeb84793423589f /test/core/bad_client | |
parent | ea318b6825be34c5a976755de9df03327fbccb0e (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.cc | 4 |
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(); } |