Skip to content

Commit

Permalink
Fix UpstreamPolicies another_strategy() when addr is NULL. (sogou#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
holmes1412 authored Jul 10, 2024
1 parent 1cbbec1 commit fe8253d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nameservice/UpstreamPolicies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,9 @@ EndpointAddress *UPSWeightedRandomPolicy::another_strategy(const ParsedURI& uri,
}
}

if (!addr)
return NULL;

return this->check_and_get(addr, false, tracing);
}

Expand Down

0 comments on commit fe8253d

Please sign in to comment.