From af9f81cbb00ca6ac3f22bcc77c6ef86537851407 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 22 Feb 2018 20:38:31 -0800 Subject: Cancel max idle timer when shutting down the server channel --- src/core/ext/filters/max_age/max_age_filter.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 abb9d69036..0de392f4d9 100644 --- a/src/core/ext/filters/max_age/max_age_filter.cc +++ b/src/core/ext/filters/max_age/max_age_filter.cc @@ -368,6 +368,9 @@ static void channel_connectivity_changed(void* arg, grpc_error* error) { max_idle_timer, and prevent max_idle_timer from being started in the future. */ increase_call_count(chand); + if (gpr_atm_acq_load(&chand->idle_state) == MAX_IDLE_STATE_SEEN_EXIT_IDLE) { + grpc_timer_cancel(&chand->max_idle_timer); + } } } -- cgit v1.2.3