fix(cmd/notification.go): no error when retry successful (#18530)

This commit is contained in:
bestgopher 2023-11-28 14:41:03 +08:00 committed by GitHub
parent 9cb94eb4a9
commit 95d6f43cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -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.