diff options
author | David Garcia Quintas <dgq@google.com> | 2018-03-14 11:19:26 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2018-03-14 11:19:26 -0700 |
commit | 2f6fc700de0431878ade712051981a2609793553 (patch) | |
tree | 8d08aefb2cda4b4781003acd1982a13d5225ccaa /src | |
parent | aa843f2bfc83b588a645d5edc9300b0e1d353f93 (diff) |
Abort if direct channel doesn't provide default authority ch arg
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/surface/channel.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index 93f3009dba..274dfe38bf 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -157,9 +157,10 @@ static grpc_core::UniquePtr<char> get_default_authority( } 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)); + gpr_log(GPR_ERROR, + "Direct channels must specify a value for the " + "GRPC_ARG_DEFAULT_AUTHORITY channel arg."); + abort(); } return default_authority; } |