diff options
author | 2015-07-13 08:41:49 -0700 | |
---|---|---|
committer | 2015-07-13 08:41:49 -0700 | |
commit | 143e7bf0cfcbfd60422f4e8f15e6b5c18259c8cd (patch) | |
tree | cbeb3f4da486b08a6cdae1be6754c523e2a361fb /src/core/surface/server.c | |
parent | f0fb537da9e67902f56b50d3d0f516b295609d88 (diff) |
Introduce a clock type field onto gpr_timespec.
Use it to validate that arithmetic on time types makes even some vague
kind of sense.
Diffstat (limited to 'src/core/surface/server.c')
-rw-r--r-- | src/core/surface/server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/surface/server.c b/src/core/surface/server.c index 4f868c52b6..026ba70347 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -549,7 +549,8 @@ static void server_on_recv(void *ptr, int success) { grpc_stream_op *op = &ops[i]; if (op->type != GRPC_OP_METADATA) continue; grpc_metadata_batch_filter(&op->data.metadata, server_filter, elem); - if (0 != gpr_time_cmp(op->data.metadata.deadline, gpr_inf_future)) { + if (0 != gpr_time_cmp(op->data.metadata.deadline, + gpr_inf_future(GPR_CLOCK_REALTIME))) { calld->deadline = op->data.metadata.deadline; } calld->got_initial_metadata = 1; @@ -623,7 +624,7 @@ static void accept_stream(void *cd, grpc_transport *transport, channel_data *chand = cd; /* create a call */ grpc_call_create(chand->channel, NULL, transport_server_data, NULL, 0, - gpr_inf_future); + gpr_inf_future(GPR_CLOCK_REALTIME)); } static void channel_connectivity_changed(void *cd, int iomgr_status_ignored) { @@ -651,7 +652,7 @@ static void init_call_elem(grpc_call_element *elem, call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; memset(calld, 0, sizeof(call_data)); - calld->deadline = gpr_inf_future; + calld->deadline = gpr_inf_future(GPR_CLOCK_REALTIME); calld->call = grpc_call_from_top_element(elem); gpr_mu_init(&calld->mu_state); |