|
|
@ -732,6 +732,7 @@ void XdsResolver::OnListenerUpdate(XdsApi::LdsUpdate listener) { |
|
|
|
} |
|
|
|
} |
|
|
|
route_config_name_ = std::move(listener.route_config_name); |
|
|
|
route_config_name_ = std::move(listener.route_config_name); |
|
|
|
if (!route_config_name_.empty()) { |
|
|
|
if (!route_config_name_.empty()) { |
|
|
|
|
|
|
|
current_virtual_host_.routes.clear(); |
|
|
|
auto watcher = absl::make_unique<RouteConfigWatcher>(Ref()); |
|
|
|
auto watcher = absl::make_unique<RouteConfigWatcher>(Ref()); |
|
|
|
route_config_watcher_ = watcher.get(); |
|
|
|
route_config_watcher_ = watcher.get(); |
|
|
|
xds_client_->WatchRouteConfigData(route_config_name_, std::move(watcher)); |
|
|
|
xds_client_->WatchRouteConfigData(route_config_name_, std::move(watcher)); |
|
|
@ -741,6 +742,10 @@ void XdsResolver::OnListenerUpdate(XdsApi::LdsUpdate listener) { |
|
|
|
if (route_config_name_.empty()) { |
|
|
|
if (route_config_name_.empty()) { |
|
|
|
GPR_ASSERT(current_listener_.rds_update.has_value()); |
|
|
|
GPR_ASSERT(current_listener_.rds_update.has_value()); |
|
|
|
OnRouteConfigUpdate(std::move(*current_listener_.rds_update)); |
|
|
|
OnRouteConfigUpdate(std::move(*current_listener_.rds_update)); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// HCM may contain newer filter config. We need to propagate the update as
|
|
|
|
|
|
|
|
// config selector to the channel
|
|
|
|
|
|
|
|
GenerateResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|