Release global lock on early error (#2760)

This commit is contained in:
Maycon Santos
2024-10-19 18:32:17 +02:00
committed by GitHub
parent c8d8748dcf
commit 88e4fc2245

View File

@@ -2220,6 +2220,7 @@ func (am *DefaultAccountManager) getPrivateDomainWithGlobalLock(ctx context.Cont
// check again if the domain has a primary account because of simultaneous requests
domainAccountID, err = am.Store.GetAccountIDByPrivateDomain(ctx, LockingStrengthShare, domain)
if handleNotFound(err) != nil {
cancel()
log.WithContext(ctx).Errorf(errorGettingDomainAccIDFmt, err)
return "", nil, err
}