@cryptotaxi247 / netdata-1 / commits / f84bc5055

fix(go.d/sd/netlisteners): fix exec deadline exceeded check (#18774)

Ilya Mashchenko committed Oct 14, 2024 at 17:13 UTC f84bc50557f2745e62b81d7f2867877e293746c9
1 file changed +1 -1
src/go/plugin/go.d/agent/discovery/sd/discoverer/netlisteners/netlisteners.go
+1 -1
@@ -131,7 +131,7 @@ func (d *Discoverer) Discover(ctx context.Context, in chan<- []model.TargetGroup
131 func (d *Discoverer) discoverLocalListeners(ctx context.Context, in chan<- []model.TargetGroup) error {
132 bs, err := d.ll.discover(ctx)
133 if err != nil {
134 - if errors.Is(err, context.Canceled) {
134 + if errors.Is(err, context.DeadlineExceeded) {
135 // there is no point in continuing pointless attempts/use cpu
136 // https://github.com/netdata/netdata/discussions/18751#discussioncomment-10908472
137 if d.timeoutRuns++; d.timeoutRuns > 5 && d.successRuns == 0 {