Skip to content

Commit

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

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

if (sg_->pre_select_)
{
WFConditional *cond = sg_->pre_select_(this);
Expand Down Expand Up @@ -145,6 +148,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 a6ea44c

Please sign in to comment.