diff options
author | David Garcia Quintas <dgq@google.com> | 2016-03-28 17:03:14 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-03-28 17:03:14 -0700 |
commit | 1809bba1ca7332836a20d8e3f8222b18d594b688 (patch) | |
tree | 58134ede0214ec22690a2b6b5d39478573b6ca4d /src | |
parent | d5dd1a388b21f2b897aaa8db8e77427e9e0efc79 (diff) |
PR comments.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/client_config/resolvers/sockaddr_resolver.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/client_config/resolvers/sockaddr_resolver.c b/src/core/client_config/resolvers/sockaddr_resolver.c index be9d62b8e3..28c8ce5377 100644 --- a/src/core/client_config/resolvers/sockaddr_resolver.c +++ b/src/core/client_config/resolvers/sockaddr_resolver.c @@ -318,10 +318,12 @@ static grpc_resolver *sockaddr_create( } if (strcmp("grpclb", r->lb_policy_name) == 0 && !lb_enabled) { - /* we want grpclb but the "resolved" addresses aren't LB enabled. Fall - * back to the default policy */ - gpr_free(r->lb_policy_name); - r->lb_policy_name = gpr_strdup(default_lb_policy_name); + /* we want grpclb but the "resolved" addresses aren't LB enabled. Bail + * out, as this is meant mostly for tests. */ + gpr_log(GPR_ERROR, + "Requested 'grpclb' LB policy but resolved addresses don't " + "support load balancing."); + abort(); } gpr_slice_buffer_destroy(&query_parts); gpr_slice_buffer_destroy(&query_param_parts); |