diff --git a/pkg/routeagent_driver/handlers/healthchecker/healthchecker.go b/pkg/routeagent_driver/handlers/healthchecker/healthchecker.go index 1701605f9..8c9a6ac34 100644 --- a/pkg/routeagent_driver/handlers/healthchecker/healthchecker.go +++ b/pkg/routeagent_driver/handlers/healthchecker/healthchecker.go @@ -98,16 +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) - - return nil + return h.RemoteEndpointUpdated(endpoint) } func (h *controller) RemoteEndpointUpdated(endpoint *submarinerv1.Endpoint) error {