|
|
@ -709,11 +709,13 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, |
|
|
|
/* Skip balancer addresses, since we only know how to handle backends. */ |
|
|
|
/* Skip balancer addresses, since we only know how to handle backends. */ |
|
|
|
if (addresses->addresses[i].is_balancer) continue; |
|
|
|
if (addresses->addresses[i].is_balancer) continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const char *keys_to_remove[] = {GRPC_ARG_SUBCHANNEL_ADDRESS}; |
|
|
|
memset(&sc_args, 0, sizeof(grpc_subchannel_args)); |
|
|
|
memset(&sc_args, 0, sizeof(grpc_subchannel_args)); |
|
|
|
grpc_arg addr_arg = |
|
|
|
grpc_arg addr_arg = |
|
|
|
grpc_create_subchannel_address_arg(&addresses->addresses[i].address); |
|
|
|
grpc_create_subchannel_address_arg(&addresses->addresses[i].address); |
|
|
|
grpc_channel_args *new_args = |
|
|
|
grpc_channel_args *new_args = grpc_channel_args_copy_and_add_and_remove( |
|
|
|
grpc_channel_args_copy_and_add(args->args, &addr_arg, 1); |
|
|
|
args->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &addr_arg, |
|
|
|
|
|
|
|
1); |
|
|
|
gpr_free(addr_arg.value.string); |
|
|
|
gpr_free(addr_arg.value.string); |
|
|
|
sc_args.args = new_args; |
|
|
|
sc_args.args = new_args; |
|
|
|
grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel( |
|
|
|
grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel( |
|
|
|