From f2f92cb77fbfb15907598cbff652634950a71dd7 Mon Sep 17 00:00:00 2001 From: Karol Kokoszka Date: Fri, 25 Oct 2024 15:37:51 +0200 Subject: [PATCH] Updated context.Cancelled error check. --- pkg/service/cluster/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/service/cluster/service.go b/pkg/service/cluster/service.go index 34e98a45b..9fd747f00 100644 --- a/pkg/service/cluster/service.go +++ b/pkg/service/cluster/service.go @@ -213,7 +213,7 @@ func (s *Service) discoverClusterHosts(ctx context.Context, c *Cluster) (knownHo knownHosts, liveHosts, err := s.discoverClusterHostUsingCoordinator(discoverContext, c, discoverClusterHostsTimeout, host) if err != nil { // Only log if the context hasn't been canceled - if discoverContext.Err() != context.Canceled { + if !errors.Is(discoverContext.Err(), context.Canceled) { s.logger.Error(ctx, "Couldn't discover hosts", "host", host, "error", err) } return