aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/max_age
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@gmail.com>2018-06-14 11:43:18 -0400
committerGravatar GitHub <noreply@github.com>2018-06-14 11:43:18 -0400
commit7ea8a60ed0ba4faeeb912e9b76ae1d0a222b3ddf (patch)
tree7a709e76d25faf1532df83c73dcefc571bd5685c /src/core/ext/filters/max_age
parent9a2c0a8641d1837185a60436adf9419209f89fbe (diff)
Revert "Add Type Checking On Channel Args"
Diffstat (limited to 'src/core/ext/filters/max_age')
-rw-r--r--src/core/ext/filters/max_age/max_age_filter.cc13
1 files changed, 7 insertions, 6 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 bbe4998f00..1fe8288bd0 100644
--- a/src/core/ext/filters/max_age/max_age_filter.cc
+++ b/src/core/ext/filters/max_age/max_age_filter.cc
@@ -519,12 +519,13 @@ static bool maybe_add_max_age_filter(grpc_channel_stack_builder* builder,
void* arg) {
const grpc_channel_args* channel_args =
grpc_channel_stack_builder_get_channel_arguments(builder);
- bool enable = grpc_channel_args_get_integer(
- channel_args, GRPC_ARG_MAX_CONNECTION_AGE_MS,
- MAX_CONNECTION_AGE_INTEGER_OPTIONS) != INT_MAX ||
- grpc_channel_args_get_integer(
- channel_args, GRPC_ARG_MAX_CONNECTION_IDLE_MS,
- MAX_CONNECTION_IDLE_INTEGER_OPTIONS) != INT_MAX;
+ bool enable =
+ grpc_channel_arg_get_integer(
+ grpc_channel_args_find(channel_args, GRPC_ARG_MAX_CONNECTION_AGE_MS),
+ MAX_CONNECTION_AGE_INTEGER_OPTIONS) != INT_MAX ||
+ grpc_channel_arg_get_integer(
+ grpc_channel_args_find(channel_args, GRPC_ARG_MAX_CONNECTION_IDLE_MS),
+ MAX_CONNECTION_IDLE_INTEGER_OPTIONS) != INT_MAX;
if (enable) {
return grpc_channel_stack_builder_prepend_filter(
builder, &grpc_max_age_filter, nullptr, nullptr);