From 8aa2b49b4edd62da362f0156a70ade369316855b Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 21 Jan 2020 13:47:02 -0800 Subject: [PATCH] Set keepalive interval for xds channel to 5 minutes. --- src/core/ext/filters/client_channel/xds/xds_client.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/ext/filters/client_channel/xds/xds_client.cc b/src/core/ext/filters/client_channel/xds/xds_client.cc index c9f07690814..e533bd490a2 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.cc +++ b/src/core/ext/filters/client_channel/xds/xds_client.cc @@ -341,9 +341,14 @@ grpc_channel_args* BuildXdsChannelArgs(const grpc_channel_args& args) { // Don't want to pass down channelz node from parent; the balancer // channel will get its own. GRPC_ARG_CHANNELZ_CHANNEL_NODE, + // Keepalive interval. We are explicitly setting our own value below. + GRPC_ARG_KEEPALIVE_TIME_MS, }; // Channel args to add. - InlinedVector args_to_add; + InlinedVector args_to_add; + // Keepalive interval. + args_to_add.emplace_back(grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_KEEPALIVE_TIME_MS), 5000)); // A channel arg indicating that the target is an xds server. // TODO(roth): Once we figure out our fallback and credentials story, decide // whether this is actually needed. Note that it's currently used by the