aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-02-16 12:39:33 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-02-16 12:39:33 -0800
commit0a77de87ad8c5d2de0998186026c93a99afa5914 (patch)
treea69ca986bb30d82e0a0a806c1b82242389ba19ac
parent4447c2c6fc51ad0b9cbb542338084c8000543c8e (diff)
Fix conditional, optimize cancellation
-rw-r--r--src/core/lib/channel/deadline_filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c
index fcc08c53ac..fbc858bccc 100644
--- a/src/core/lib/channel/deadline_filter.c
+++ b/src/core/lib/channel/deadline_filter.c
@@ -69,7 +69,7 @@ static void start_timer_if_needed(grpc_exec_ctx* exec_ctx,
grpc_call_element* elem,
gpr_timespec deadline) {
deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
- if (gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) != 0) {
+ if (gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) == 0) {
return;
}
grpc_deadline_state* deadline_state = elem->call_data;
@@ -99,7 +99,7 @@ static void cancel_timer_if_needed(grpc_exec_ctx* exec_ctx,
timer_val = gpr_atm_acq_load(&deadline_state->timers[i]);
switch (timer_val) {
case 0:
- break;
+ return;
case TOMBSTONE_TIMER:
break;
default: