Return on failure to acquire a semaphore

This commit is contained in:
Jim McDonald 2020-09-30 10:44:29 +01:00
parent fc97a9f157
commit 702e4d5964
No known key found for this signature in database
GPG Key ID: 89CEB61B2AD2A5E7
2 changed files with 4 additions and 0 deletions

View File

@ -1,3 +1,6 @@
Development
- do not continue if attempt to acquire a semaphore fails
0.6.1
- update documentation for account managers, explaining the difference between Dirk and wallet
- add submitter configuration to documentation

View File

@ -181,6 +181,7 @@ func (s *Service) calculateSubscriptionInfo(ctx context.Context,
defer wg.Done()
if err := sem.Acquire(ctx, 1); err != nil {
log.Error().Err(err).Msg("Failed to obtain semaphore")
return
}
defer sem.Release(1)
subscriptionInfoMutex.RLock()