Skip to content

Commit

Permalink
listener manager: avoid unique -> shared conversion (#14693)
Browse files Browse the repository at this point in the history
buildFilterChainInternal() returns a shared_ptr, so let's make
that instead of unique_ptr.

Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
  • Loading branch information
Raúl Gutiérrez Segalés authored Jan 14, 2021
1 parent 09d112c commit e9f9df3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/server/listener_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ Network::DrainableFilterChainSharedPtr ListenerFilterChainFactoryBuilder::buildF
std::vector<std::string> server_names(filter_chain.filter_chain_match().server_names().begin(),
filter_chain.filter_chain_match().server_names().end());

auto filter_chain_res = std::make_unique<FilterChainImpl>(
auto filter_chain_res = std::make_shared<FilterChainImpl>(
config_factory.createTransportSocketFactory(*message, factory_context_,
std::move(server_names)),
listener_component_factory_.createNetworkFilterFactoryList(filter_chain.filters(),
Expand Down

0 comments on commit e9f9df3

Please sign in to comment.