aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/max_age
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2017-04-07 11:36:05 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2017-04-07 11:40:08 -0700
commit185d4133405c620953b008299ea233d8df20071b (patch)
tree37340001e60e5e65a80048c17eb9caa2de9d0058 /src/core/ext/filters/max_age
parente98ae0e3b74a41217a6039ce5b75d35a0b9edea0 (diff)
Fix the max idle timer
Diffstat (limited to 'src/core/ext/filters/max_age')
-rw-r--r--src/core/ext/filters/max_age/max_age_filter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/ext/filters/max_age/max_age_filter.c b/src/core/ext/filters/max_age/max_age_filter.c
index a045f0a421..b9fde36286 100644
--- a/src/core/ext/filters/max_age/max_age_filter.c
+++ b/src/core/ext/filters/max_age/max_age_filter.c
@@ -167,8 +167,9 @@ static void start_max_age_grace_timer_after_goaway_op(grpc_exec_ctx* exec_ctx,
static void close_max_idle_channel(grpc_exec_ctx* exec_ctx, void* arg,
grpc_error* error) {
channel_data* chand = arg;
- gpr_atm_no_barrier_fetch_add(&chand->call_count, 1);
if (error == GRPC_ERROR_NONE) {
+ /* Prevent the max idle timer from being set again */
+ gpr_atm_no_barrier_fetch_add(&chand->call_count, 1);
grpc_transport_op* op = grpc_make_transport_op(NULL);
op->goaway_error =
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("max_idle"),