aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2018-02-22 20:38:31 -0800
committerGravatar Mehrdad Afshari <mmx@google.com>2018-02-26 10:21:39 -0800
commitaf9f81cbb00ca6ac3f22bcc77c6ef86537851407 (patch)
tree94b6a9fab01a9fb2e845464d68843067ab676e5c /src
parent01e5057190fb2444dc8de978cc25c51c0ba44f88 (diff)
Cancel max idle timer when shutting down the server channel
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/filters/max_age/max_age_filter.cc3
1 files changed, 3 insertions, 0 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 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);
+ }
}
}