diff options
author | Hongwei Wang <hongweiw@google.com> | 2015-07-17 16:34:08 -0700 |
---|---|---|
committer | Hongwei Wang <hongweiw@google.com> | 2015-07-17 16:34:08 -0700 |
commit | eec3b9103baa784bbcd6be10d101ab53b1f169de (patch) | |
tree | 20486c763f5f4aabfdf9f73232fc5c372702c1ee /src/core/client_config/resolvers | |
parent | f0e9fecbe013b24b342bbef2e05350c996b81ab1 (diff) |
Zookeeper path remove the last slash
Diffstat (limited to 'src/core/client_config/resolvers')
-rw-r--r-- | src/core/client_config/resolvers/zookeeper_resolver.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/client_config/resolvers/zookeeper_resolver.c b/src/core/client_config/resolvers/zookeeper_resolver.c index e14d341610..758ca4d7bc 100644 --- a/src/core/client_config/resolvers/zookeeper_resolver.c +++ b/src/core/client_config/resolvers/zookeeper_resolver.c @@ -382,6 +382,9 @@ static grpc_resolver *zookeeper_create( gpr_mu_init(&r->mu); grpc_resolver_init(&r->base, &zookeeper_resolver_vtable); r->name = gpr_strdup(path); + if (r->name[strlen(r->name)-1] == '/') { + r->name[strlen(r->name)-1] = 0; + } r->subchannel_factory = subchannel_factory; r->lb_policy_factory = lb_policy_factory; grpc_subchannel_factory_ref(subchannel_factory); |