aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-07-11 13:56:06 -0700
committerGravatar GitHub <noreply@github.com>2017-07-11 13:56:06 -0700
commit102efba80bff45c6083c376459755bc15818ad33 (patch)
treef7bf79a1e9857afeeb7c5e8a322fa8444e288f3c /src/core
parentaee639e9a69a29f30bf716cb71c3d5685a110cc7 (diff)
parent07c016b674a7682e75367ff5e985970190aae655 (diff)
Merge pull request #11186 from ctiller/hps
Stop setting deadline on server requests, assert so that this never happens again
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c15
-rw-r--r--src/core/lib/surface/call.c4
2 files changed, 18 insertions, 1 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index d05aa00a3e..f790267944 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.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);
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c
index c769866ceb..aac443ed06 100644
--- a/src/core/lib/surface/call.c
+++ b/src/core/lib/surface/call.c
@@ -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 =