1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 09:35:00 +09:00

GO-5612 Fix should retry vs should return

This commit is contained in:
Mikhail Rakhmanov 2025-05-19 18:28:04 +02:00
parent 0ed333dfba
commit 9f78d5f1e4
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B

View file

@ -76,8 +76,8 @@ func (ls *loadingSpace) loadRetry(ctx context.Context) {
}
close(ls.loadCh)
}()
shouldRetry, err := ls.load(ctx)
if !shouldRetry {
shouldReturn, err := ls.load(ctx)
if shouldReturn {
ls.setLoadErr(err)
return
}
@ -88,8 +88,8 @@ func (ls *loadingSpace) loadRetry(ctx context.Context) {
ls.setLoadErr(ctx.Err())
return
case <-time.After(timeout):
shouldRetry, err := ls.load(ctx)
if !shouldRetry {
shouldReturn, err := ls.load(ctx)
if shouldReturn {
ls.setLoadErr(err)
return
}