fixup: code review

pull/36154/head
Eugene Ostroukhov 8 months ago
parent e8f9e5b922
commit aada3e7e4a
  1. 10
      src/core/ext/xds/xds_bootstrap_grpc.cc

@ -237,7 +237,7 @@ void GrpcXdsBootstrap::GrpcAuthority::JsonPostLoad(
ValidationErrors* /*errors*/) {
if (!IsFallbackExperimentEnabled()) {
if (servers_.size() > 1) {
servers_ = {servers_[0]};
servers_.resize(1);
}
}
}
@ -250,10 +250,8 @@ absl::StatusOr<std::unique_ptr<GrpcXdsBootstrap>> GrpcXdsBootstrap::Create(
absl::string_view json_string) {
auto json = JsonParse(json_string);
if (!json.ok()) {
return absl::InvalidArgumentError(
absl::StrCat("Failed to parse bootstrap "
"JSON string: ",
json.status().ToString()));
return absl::InvalidArgumentError(absl::StrCat(
"Failed to parse bootstrap JSON string: ", json.status().ToString()));
}
// Validate JSON.
class XdsJsonArgs : public JsonArgs {
@ -320,7 +318,7 @@ void GrpcXdsBootstrap::JsonPostLoad(const Json& /*json*/,
}
if (!IsFallbackExperimentEnabled()) {
if (servers_.size() > 1) {
servers_ = {servers_[0]};
servers_.resize(1);
}
}
}

Loading…
Cancel
Save