Make the thread wait so that write can complete too

pull/14112/head
Yash Tibrewal 7 years ago
parent ea318b6825
commit b9a34339a7
  1. 4
      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), client_cq, grpc_timeout_milliseconds_to_deadline(100),
nullptr) nullptr)
.type == GRPC_QUEUE_TIMEOUT); .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; if (arg->client_validator(&incoming, arg->client_validator_arg)) break;
gpr_log(GPR_INFO, gpr_log(GPR_INFO,
"client validator failed; trying additional read " "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_core::ExecCtx::Get()->Flush();
} }
grpc_slice_buffer_destroy_internal(&outgoing); grpc_slice_buffer_destroy_internal(&outgoing);
grpc_core::ExecCtx::Get()->Flush(); grpc_core::ExecCtx::Get()->Flush();
} }

Loading…
Cancel
Save