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:
parent
0ed333dfba
commit
9f78d5f1e4
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue