diff --git a/internal/watcher/health/monitor/monitor.go b/internal/watcher/health/monitor/monitor.go index 2266780e..f9268bc4 100644 --- a/internal/watcher/health/monitor/monitor.go +++ b/internal/watcher/health/monitor/monitor.go @@ -33,8 +33,6 @@ type ( checkHealth HealthCheckFunc startTime time.Time - isZeroPort bool - notifyFunc notif.NotifyFunc numConsecFailures atomic.Int64 downNotificationSent atomic.Bool @@ -91,13 +89,6 @@ func newMonitor(u *url.URL, cfg types.HealthCheckConfig, healthCheckFunc HealthC mon.url.Store(u) mon.status.Store(types.StatusHealthy) mon.lastResult.Store(types.HealthCheckResult{Healthy: true, Detail: "started"}) - - port := u.Port() - mon.isZeroPort = port == "" || port == "0" - if mon.isZeroPort { - mon.status.Store(types.StatusUnknown) - mon.lastResult.Store(types.HealthCheckResult{Healthy: false, Detail: "no port detected"}) - } return mon } @@ -119,10 +110,6 @@ func (mon *monitor) Start(parent task.Parent) gperr.Error { return ErrNegativeInterval } - if mon.isZeroPort { - return nil - } - mon.service = parent.Name() mon.task = parent.Subtask("health_monitor", true)