fix handling of service config choosing when percentage is zero

pull/12517/head
Alexander Polcyn 7 years ago
parent cc86cb7560
commit dd2c3cf23a
  1. 2
      src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c

@ -204,7 +204,7 @@ static char *choose_service_config(char *service_config_choice_json) {
int random_pct = rand() % 100;
int percentage;
if (sscanf(field->value, "%d", &percentage) != 1 ||
random_pct > percentage) {
random_pct > percentage || percentage == 0) {
service_config_json = NULL;
break;
}

Loading…
Cancel
Save