weed/mount: simplify metadata flush retry returns (#8763)

This commit is contained in:
Chris Lu
2026-03-24 12:24:56 -07:00
committed by GitHub
parent cca1555cc7
commit 6c35a3724a

View File

@@ -12,10 +12,10 @@ func retryMetadataFlush(flush func() error, onRetry func(nextAttempt, totalAttem
for attempt := 1; attempt <= totalAttempts; attempt++ {
err = flush()
if err == nil {
return nil
break
}
if attempt == totalAttempts {
return err
break
}
backoff := time.Duration(1<<uint(attempt-1)) * time.Second