Skip to content

Commit d05a4b0

Browse files
feat:modify ipv6 instances processing. (#656)
Signed-off-by: Haotian Zhang <[email protected]>
1 parent 2013946 commit d05a4b0

File tree

1 file changed

+1
-4
lines changed
  • polaris-discovery/polaris-discovery-client/src/main/java/com/tencent/polaris/discovery/client/flow

1 file changed

+1
-4
lines changed

polaris-discovery/polaris-discovery-client/src/main/java/com/tencent/polaris/discovery/client/flow/SyncFlow.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ public InstancesResponse commonSyncGetAllInstances(CommonInstancesRequest reques
6666
public InstancesResponse commonSyncGetInstances(CommonInstancesRequest request) throws PolarisException {
6767
syncGetServiceInstances(request);
6868
ServiceInstances dstInstances = request.getDstInstances();
69-
if (request.isPreferIpv6()) {
70-
dstInstances = DiscoveryUtils.generateIpv6ServiceInstances(dstInstances);
71-
}
7269
if (CollectionUtils.isEmpty(dstInstances.getInstances())) {
7370
return new InstancesResponse(dstInstances, "", null);
7471
}
@@ -124,7 +121,7 @@ private void syncGetServiceInstances(CommonInstancesRequest request) throws Pola
124121
ResourcesResponse resourcesResponse = BaseFlow.syncGetResources(extensions, false, request, request);
125122
ServiceInstances serviceInstances = resourcesResponse.getServiceInstances(request.getDstInstanceEventKey());
126123
if (request.isPreferIpv6()) {
127-
124+
serviceInstances = DiscoveryUtils.generateIpv6ServiceInstances(serviceInstances);
128125
}
129126
request.setDstInstances(serviceInstances);
130127
if (null != request.getDstRuleEventKey()) {

0 commit comments

Comments
 (0)