From 2f6fc700de0431878ade712051981a2609793553 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 14 Mar 2018 11:19:26 -0700 Subject: Abort if direct channel doesn't provide default authority ch arg --- src/core/lib/surface/channel.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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 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; } -- cgit v1.2.3