commit 1e3b38573d87e00aff1431e51f3c24e4d899ffd6
parent c365863ea9debdb4bdc1255d75fd426a7be4b1b5
Author: tobi <31960611+tsmethurst@users.noreply.github.com>
Date: Mon, 18 Apr 2022 17:44:36 +0200
[bugfix] Fix infinite domain block database loop (#467)
This fixes an issue where the domain block logic would go into an infinite loop.
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/internal/db/bundb/instance.go b/internal/db/bundb/instance.go
@@ -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
}