Skip to content

Commit

Permalink
Updated context.Cancelled error check.
Browse files Browse the repository at this point in the history
  • Loading branch information
karol-kokoszka committed Oct 25, 2024
1 parent e85dd4d commit f2f92cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/service/cluster/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2f92cb

Please sign in to comment.