aboutsummaryrefslogtreecommitdiff
path: root/userapi
diff options
context:
space:
mode:
authorTill Faelligen <2353100+S7evinK@users.noreply.github.com>2022-09-26 10:45:35 +0200
committerTill Faelligen <2353100+S7evinK@users.noreply.github.com>2022-09-26 10:45:35 +0200
commit3c416517b0045a27ec0bd03f285600b733dd5d1c (patch)
treeab77ad09446992f0ab81f03539c2df65e00290dd /userapi
parent8d64c24b23518fde968020e5a093564acc46235a (diff)
Fix possible "Database is locked" issue
Diffstat (limited to 'userapi')
-rw-r--r--userapi/storage/shared/storage.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/userapi/storage/shared/storage.go b/userapi/storage/shared/storage.go
index acc65212..e32a442d 100644
--- a/userapi/storage/shared/storage.go
+++ b/userapi/storage/shared/storage.go
@@ -777,7 +777,7 @@ func (d *Database) GetPushers(
func (d *Database) RemovePusher(
ctx context.Context, appid, pushkey, localpart string,
) error {
- return d.Writer.Do(nil, nil, func(txn *sql.Tx) error {
+ return d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
err := d.Pushers.DeletePusher(ctx, txn, appid, pushkey, localpart)
if err == sql.ErrNoRows {
return nil
@@ -792,7 +792,7 @@ func (d *Database) RemovePusher(
func (d *Database) RemovePushers(
ctx context.Context, appid, pushkey string,
) error {
- return d.Writer.Do(nil, nil, func(txn *sql.Tx) error {
+ return d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
return d.Pushers.DeletePushers(ctx, txn, appid, pushkey)
})
}