Skip to content

Commit a9b1fd8

Browse files
committed
fix match error
1 parent 6a20c0b commit a9b1fd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/provider/adc/translator/httproute.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,6 @@ func (t *Translator) translateEndpointSlice(portName *string, weight int, endpoi
272272
return nodes
273273
}
274274
for _, endpointSlice := range endpointSlices {
275-
if portName != nil && len(nodes) > 0 {
276-
break
277-
}
278275
for _, port := range endpointSlice.Ports {
279276
if portName != nil && !ptr.Equal(portName, port.Name) {
280277
continue
@@ -289,6 +286,9 @@ func (t *Translator) translateEndpointSlice(portName *string, weight int, endpoi
289286
nodes = append(nodes, node)
290287
}
291288
}
289+
if portName != nil {
290+
break
291+
}
292292
}
293293
}
294294

0 commit comments

Comments
 (0)