[bugfix] Fix infinite domain block database loop (#467)

This fixes an issue where the domain block logic would go into an infinite loop.
This commit is contained in:
tobi 2022-04-18 17:44:36 +02:00 committed by GitHub
parent c365863ea9
commit 1e3b38573d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,5 +123,10 @@ func (i *instanceDB) GetInstanceAccounts(ctx context.Context, domain string, max
if err := q.Scan(ctx); err != nil {
return nil, i.conn.ProcessError(err)
}
if len(accounts) == 0 {
return nil, db.ErrNoEntries
}
return accounts, nil
}