Skip to content

Commit

Permalink
fix fallback cluster bug
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlanni committed Sep 5, 2024
1 parent 8c3cc1a commit 43ffe26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion source/common/router/config_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,9 @@ RouteConstSharedPtr RouteEntryImplBase::pickWeightedCluster(const Http::HeaderMa
static_cast<RouteEntryAndRoute*>(cluster.get()));
return cluster_specifier_plugin_->route(route, *request_header);
}
return cluster_specifier_plugin_->route(cluster, *request_header);
auto route = std::make_shared<DynamicRouteEntry>(cluster.get(), shared_from_this(),
cluster->clusterName());
return cluster_specifier_plugin_->route(route, *request_header);
}
#endif
if (!cluster->clusterHeaderName().get().empty() &&
Expand Down
4 changes: 2 additions & 2 deletions source/common/router/config_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,8 @@ class RouteEntryImplBase : public RouteEntryAndRoute,
}

RouteConstSharedPtr clone(const std::string& name) const {
return std::make_shared<Envoy::Router::RouteEntryImplBase::DynamicRouteEntry>(
parent_, shared_from_this(), name);
return std::make_shared<Envoy::Router::RouteEntryImplBase::DynamicRouteEntry>(parent_, owner_,
name);
}

virtual RouteConstSharedPtr getRouteConstSharedPtr() const { return shared_from_this(); }
Expand Down

0 comments on commit 43ffe26

Please sign in to comment.