Skip to content

Commit

Permalink
rename map
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szwaj <[email protected]>
  • Loading branch information
cnvergence committed Apr 2, 2024
1 parent 81d5899 commit 4e77360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/gatewayapi/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type ListenersTranslator interface {

func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap, infraIR InfraIRMap, resources *Resources) {
// Infra IR proxy ports must be unique.
mergedGatewayPorts := make(map[string][]*protocolPort)
foundPorts := make(map[string][]*protocolPort)
t.validateConflictedLayer7Listeners(gateways)
t.validateConflictedLayer4Listeners(gateways, gwapiv1.TCPProtocolType, gwapiv1.TLSProtocolType)
t.validateConflictedLayer4Listeners(gateways, gwapiv1.UDPProtocolType)
Expand Down Expand Up @@ -121,9 +121,9 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap

// Add the listener to the Infra IR. Infra IR ports must have a unique port number per layer-4 protocol
// (TCP or UDP).
if !containsPort(mergedGatewayPorts[irKey], servicePort) {
if !containsPort(foundPorts[irKey], servicePort) {
t.processInfraIRListener(listener, infraIR, irKey, servicePort)
mergedGatewayPorts[irKey] = append(mergedGatewayPorts[irKey], servicePort)
foundPorts[irKey] = append(foundPorts[irKey], servicePort)
}
}
}
Expand Down

0 comments on commit 4e77360

Please sign in to comment.