diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
commit | 6c26b16fe06b1cc75b4dac372f4f51f6b7d1bfc0 (patch) | |
tree | 5d9b7bbdcf125bfc103b67778349ea075b049bb4 /src/core/ext/filters/max_age | |
parent | 75122c23578e24417dcf64081c737571a9fc2dbc (diff) |
Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes
Diffstat (limited to 'src/core/ext/filters/max_age')
-rw-r--r-- | src/core/ext/filters/max_age/max_age_filter.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/core/ext/filters/max_age/max_age_filter.cc b/src/core/ext/filters/max_age/max_age_filter.cc index 015a3ce124..f89e8c730d 100644 --- a/src/core/ext/filters/max_age/max_age_filter.cc +++ b/src/core/ext/filters/max_age/max_age_filter.cc @@ -99,9 +99,10 @@ static void increase_call_count(channel_data* chand) { static void decrease_call_count(channel_data* chand) { if (gpr_atm_full_fetch_add(&chand->call_count, -1) == 1) { GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_idle_timer"); - grpc_timer_init(&chand->max_idle_timer, - ExecCtx::Get()->Now() + chand->max_connection_idle, - &chand->close_max_idle_channel); + grpc_timer_init( + &chand->max_idle_timer, + grpc_core::ExecCtx::Get()->Now() + chand->max_connection_idle, + &chand->close_max_idle_channel); } } @@ -121,7 +122,7 @@ static void start_max_age_timer_after_init(void* arg, grpc_error* error) { chand->max_age_timer_pending = true; GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_timer"); grpc_timer_init(&chand->max_age_timer, - ExecCtx::Get()->Now() + chand->max_connection_age, + grpc_core::ExecCtx::Get()->Now() + chand->max_connection_age, &chand->close_max_age_channel); gpr_mu_unlock(&chand->max_age_timer_mu); grpc_transport_op* op = grpc_make_transport_op(NULL); @@ -138,11 +139,12 @@ static void start_max_age_grace_timer_after_goaway_op(void* arg, gpr_mu_lock(&chand->max_age_timer_mu); chand->max_age_grace_timer_pending = true; GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_grace_timer"); - grpc_timer_init(&chand->max_age_grace_timer, - chand->max_connection_age_grace == GRPC_MILLIS_INF_FUTURE - ? GRPC_MILLIS_INF_FUTURE - : ExecCtx::Get()->Now() + chand->max_connection_age_grace, - &chand->force_close_max_age_channel); + grpc_timer_init( + &chand->max_age_grace_timer, + chand->max_connection_age_grace == GRPC_MILLIS_INF_FUTURE + ? GRPC_MILLIS_INF_FUTURE + : grpc_core::ExecCtx::Get()->Now() + chand->max_connection_age_grace, + &chand->force_close_max_age_channel); gpr_mu_unlock(&chand->max_age_timer_mu); GRPC_CHANNEL_STACK_UNREF(chand->channel_stack, "max_age start_max_age_grace_timer_after_goaway_op"); |