summaryrefslogtreecommitdiff
path: root/internal/db/bundb/instance.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-04-18 17:44:36 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-18 17:44:36 +0200
commit1e3b38573d87e00aff1431e51f3c24e4d899ffd6 (patch)
treefa6912cc3862499a63b41d47bc3ededb55d723c5 /internal/db/bundb/instance.go
parent[bugfix] Use our own (Batch)Deliver implementation for federated messages (#466) (diff)
downloadgotosocial-1e3b38573d87e00aff1431e51f3c24e4d899ffd6.tar.xz
[bugfix] Fix infinite domain block database loop (#467)
This fixes an issue where the domain block logic would go into an infinite loop.
Diffstat (limited to 'internal/db/bundb/instance.go')
-rw-r--r--internal/db/bundb/instance.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/db/bundb/instance.go b/internal/db/bundb/instance.go
index 05e9116b2..24cc6f1be 100644
--- 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
}