diff options
author | 2022-04-18 17:44:36 +0200 | |
---|---|---|
committer | 2022-04-18 17:44:36 +0200 | |
commit | 1e3b38573d87e00aff1431e51f3c24e4d899ffd6 (patch) | |
tree | fa6912cc3862499a63b41d47bc3ededb55d723c5 /internal/db/bundb/instance.go | |
parent | [bugfix] Use our own (Batch)Deliver implementation for federated messages (#466) (diff) | |
download | gotosocial-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.go | 5 |
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 } |