fix compatibility with go 1.19

This commit is contained in:
Michael Eischer committed 2024-05-18 21:28:54 +02:00
1 parent ff0744b3af
commit 8f8d872a68
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -296,8 +296,8 @@ func (be *damageOnceBackend) Load(ctx context.Context, h backend.Handle, length
}
h.IsMetadata = false
_, retry := be.m.Swap(h, true)
if !retry {
_, isRetry := be.m.LoadOrStore(h, true)
if !isRetry {
// return broken data on the first try
offset++
}