Skip to content

Commit

Permalink
Address identical functions in RA health checker
Browse files Browse the repository at this point in the history
RemoteEndpointCreated and RemoteEndpointUpdated are identical
and is reported by Sonar as an issue. Change one to call the other.

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Oct 30, 2024
1 parent c68c8ef commit 84852bd
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/routeagent_driver/handlers/healthchecker/healthchecker.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,7 @@ func (h *controller) Stop() error {
}

func (h *controller) RemoteEndpointCreated(endpoint *submarinerv1.Endpoint) error {
h.Lock()
defer h.Unlock()

if !h.config.HealthCheckerEnabled || h.State().IsOnGateway() {
return nil
}

h.processEndpointCreatedOrUpdated(endpoint)

h.RemoteEndpointUpdated(endpoint)
return nil
}

Expand Down

0 comments on commit 84852bd

Please sign in to comment.