aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface/channel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/surface/channel.cc')
-rw-r--r--src/core/lib/surface/channel.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc
index 48bc69509f..93f3009dba 100644
--- a/src/core/lib/surface/channel.cc
+++ b/src/core/lib/surface/channel.cc
@@ -155,6 +155,12 @@ static grpc_core::UniquePtr<char> get_default_authority(
if (!has_default_authority && ssl_override != nullptr) {
default_authority.reset(gpr_strdup(ssl_override));
}
+ if (channel_stack_type == GRPC_CLIENT_DIRECT_CHANNEL &&
+ default_authority == nullptr) {
+ // Set the default authority. This is handled by the subchannel stack for
+ // regular client channels.
+ default_authority.reset(gpr_strdup(target));
+ }
return default_authority;
}