From 95d6f43cc83a7ddba82589c946f7fd0c5f5d14a3 Mon Sep 17 00:00:00 2001 From: bestgopher <84328409@qq.com> Date: Tue, 28 Nov 2023 14:41:03 +0800 Subject: [PATCH] fix(cmd/notification.go): no error when retry successful (#18530) --- cmd/notification.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/notification.go b/cmd/notification.go index 515e5ecd4..70f649683 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -31,10 +31,11 @@ import ( "github.com/cespare/xxhash/v2" "github.com/klauspost/compress/zip" "github.com/minio/madmin-go/v3" - "github.com/minio/minio/internal/bucket/bandwidth" - "github.com/minio/minio/internal/logger" xnet "github.com/minio/pkg/v2/net" "github.com/minio/pkg/v2/sync/errgroup" + + "github.com/minio/minio/internal/bucket/bandwidth" + "github.com/minio/minio/internal/logger" ) // This file contains peer related notifications. For sending notifications to @@ -98,6 +99,7 @@ func (g *NotificationGroup) Go(ctx context.Context, f func() error, index int, a Host: addr, } for i := 0; i < g.retryCount; i++ { + g.errs[index].Err = nil if err := f(); err != nil { g.errs[index].Err = err // Last iteration log the error.