retry on support list failures

This commit is contained in:
Niko Storni 2020-08-18 01:09:53 +02:00
parent 0b002c8228
commit 24cf937e14

View file

@ -71,7 +71,10 @@ func abandonSupports(s *Sync) (float64, error) {
for page := uint64(1); page <= totalPages; page++ {
supports, err := s.daemon.SupportList(&defaultAccount, page, 50)
if err != nil {
return 0, errors.Prefix("cannot list claims", err)
supports, err = s.daemon.SupportList(&defaultAccount, page, 50)
if err != nil {
return 0, errors.Prefix("cannot list supports", err)
}
}
allSupports = append(allSupports, (*supports).Items...)
totalPages = (*supports).TotalPages