Skip to content

Commit

Permalink
redis: delete callback container at the end of the run
Browse files Browse the repository at this point in the history
The resolver callback is stored in `active_query_`, so let's
delete it once the cb is done running.

Signed-off-by: Raul Gutierrez Segales <[email protected]>
  • Loading branch information
rgs1 committed Oct 21, 2024
1 parent 15150fa commit dc466ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/extensions/clusters/redis/redis_cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ void RedisCluster::DnsDiscoveryResolveTarget::startResolveDns() {
dns_address_, parent_.dns_lookup_family_,
[this](Network::DnsResolver::ResolutionStatus status, absl::string_view,
std::list<Network::DnsResponse>&& response) -> void {
active_query_ = nullptr;
ENVOY_LOG(trace, "async DNS resolution complete for {}", dns_address_);
if (status == Network::DnsResolver::ResolutionStatus::Failure || response.empty()) {
if (status == Network::DnsResolver::ResolutionStatus::Failure) {
Expand All @@ -224,6 +223,7 @@ void RedisCluster::DnsDiscoveryResolveTarget::startResolveDns() {
parent_.redis_discovery_session_->registerDiscoveryAddress(std::move(response), port_);
parent_.redis_discovery_session_->startResolveRedis();
}
active_query_ = nullptr;
});
}

Expand Down

0 comments on commit dc466ef

Please sign in to comment.