Merge pull request #11186 from ctiller/hps

Stop setting deadline on server requests, assert so that this never happens again
pull/11779/head
Craig Tiller 7 years ago committed by GitHub
commit 102efba80b
  1. 15
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  2. 4
      src/core/lib/surface/call.c

@ -1487,6 +1487,21 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt;
grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs;
if (!t->is_client) {
if (op->send_initial_metadata) {
gpr_timespec deadline =
op->payload->send_initial_metadata.send_initial_metadata->deadline;
GPR_ASSERT(0 ==
gpr_time_cmp(gpr_inf_future(deadline.clock_type), deadline));
}
if (op->send_trailing_metadata) {
gpr_timespec deadline =
op->payload->send_trailing_metadata.send_trailing_metadata->deadline;
GPR_ASSERT(0 ==
gpr_time_cmp(gpr_inf_future(deadline.clock_type), deadline));
}
}
if (GRPC_TRACER_ON(grpc_http_trace)) {
char *str = grpc_transport_stream_op_batch_string(op);
gpr_log(GPR_DEBUG, "perform_stream_op[s=%p]: %s", s, str);

@ -1504,7 +1504,9 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
goto done_with_error;
}
/* TODO(ctiller): just make these the same variable? */
call->metadata_batch[0][0].deadline = call->send_deadline;
if (call->is_client) {
call->metadata_batch[0][0].deadline = call->send_deadline;
}
stream_op_payload->send_initial_metadata.send_initial_metadata =
&call->metadata_batch[0 /* is_receiving */][0 /* is_trailing */];
stream_op_payload->send_initial_metadata.send_initial_metadata_flags =

Loading…
Cancel
Save