Skip to content

Commit

Permalink
removed the unnecessary if and else part
Browse files Browse the repository at this point in the history
Signed-off-by: Rama <[email protected]>
  • Loading branch information
ramaraochavali committed Feb 1, 2018
1 parent 8b8078d commit 67dc1cf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions source/common/router/rds_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,7 @@ RdsRouteConfigProviderImpl::RdsRouteConfigProviderImpl(
},
"envoy.api.v2.RouteDiscoveryService.FetchRoutes",
"envoy.api.v2.RouteDiscoveryService.StreamRoutes");

// In V2 we use a Subscription model where the fetch can happen via gRPC, REST, or
// local filesystem. If the subscription happens via local filesystem (e.g xds_integration_test),
// then there is no actual RDS server, and hence no RDS cluster name.
if (rds.has_config_source()) {
config_source_ = MessageUtil::getJsonStringFromMessage(rds.config_source(), true);
} else {
config_source_ = "{}";
}
config_source_ = MessageUtil::getJsonStringFromMessage(rds.config_source(), true);
}

RdsRouteConfigProviderImpl::~RdsRouteConfigProviderImpl() {
Expand Down

0 comments on commit 67dc1cf

Please sign in to comment.