Wait for waitgroup to complete.

This commit is contained in:
Jim McDonald 2021-07-23 23:18:25 +01:00
parent 073eff2515
commit fa7e37fee7
No known key found for this signature in database
GPG Key ID: 89CEB61B2AD2A5E7
1 changed files with 1 additions and 0 deletions

View File

@ -193,6 +193,7 @@ func (s *Service) refreshAccounts(ctx context.Context) error {
log.Trace().Dur("elapsed", time.Since(started)).Int("accounts", len(walletAccounts)).Msg("Imported accounts")
}(ctx, sem, &wg, i, &accountsMu)
}
wg.Wait()
log.Trace().Int("accounts", len(accounts)).Msg("Obtained accounts")
if len(accounts) == 0 && len(s.accounts) != 0 {