diff --git a/healthcheck/healthcheck.go b/healthcheck/healthcheck.go index 64a417ff0..cbae33cc4 100644 --- a/healthcheck/healthcheck.go +++ b/healthcheck/healthcheck.go @@ -54,7 +54,7 @@ func NewBackendHealthCheck(URL string, lb loadBalancer) *BackendHealthCheck { } //SetBackendsConfiguration set backends configuration -func (hc *HealthCheck) SetBackendsConfiguration(backends map[string]*BackendHealthCheck, parentCtx context.Context) { +func (hc *HealthCheck) SetBackendsConfiguration(parentCtx context.Context, backends map[string]*BackendHealthCheck) { hc.Backends = backends if hc.cancel != nil { hc.cancel() diff --git a/server.go b/server.go index cb1b863a9..e9cd4decb 100644 --- a/server.go +++ b/server.go @@ -745,7 +745,7 @@ func (server *Server) loadConfig(configurations configs, globalConfiguration Glo } } } - healthcheck.GetHealthCheck().SetBackendsConfiguration(backendsHealthcheck, server.routinesPool.Ctx()) + healthcheck.GetHealthCheck().SetBackendsConfiguration(server.routinesPool.Ctx(), backendsHealthcheck) middlewares.SetBackend2FrontendMap(&backend2FrontendMap) //sort routes for _, serverEntryPoint := range serverEntryPoints {