Skip to content

Commit

Permalink
Avoid WFSGResolverTask::dispatch() select more than once.
Browse files Browse the repository at this point in the history
  • Loading branch information
Barenboim committed Mar 5, 2024
1 parent afc0ac6 commit a0890fa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/nameservice/WFServiceGovernance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ void WFSGResolverTask::dispatch()
WFNSTracing *tracing = ns_params_.tracing;
EndpointAddress *addr;

if (!sg_)
{
this->WFResolverTask::dispatch();
return;
}

if (sg_->pre_select_)
{
WFConditional *cond = sg_->pre_select_(this);
Expand Down Expand Up @@ -145,6 +151,7 @@ void WFSGResolverTask::dispatch()
}

tracing_data->history.push_back(addr);
sg_ = NULL;

copy_host_port(ns_params_.uri, addr);
dns_ttl_default_ = addr->params->dns_ttl_default;
Expand Down

0 comments on commit a0890fa

Please sign in to comment.