From 7b5493083eadf18c8386dd69371c3f639de23faa Mon Sep 17 00:00:00 2001 From: zhijian Date: Tue, 10 Sep 2024 15:41:14 +0800 Subject: [PATCH] adjust --- pkg/sync/sync.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/sync/sync.go b/pkg/sync/sync.go index de3577429799..ab297cb73ce6 100644 --- a/pkg/sync/sync.go +++ b/pkg/sync/sync.go @@ -1323,9 +1323,8 @@ func Sync(src, dst object.ObjectStorage, config *Config) error { for { if failed.Current() >= config.MaxFailure { logger.Infof("the maximum error limit of %d was reached, triggering the quick exit process", config.MaxFailure) - if syncExitFunc() != nil { - os.Exit(1) - } + _ = syncExitFunc() + os.Exit(1) } time.Sleep(time.Millisecond * 100) }