diff options
author | Till Faelligen <2353100+S7evinK@users.noreply.github.com> | 2022-09-26 10:45:35 +0200 |
---|---|---|
committer | Till Faelligen <2353100+S7evinK@users.noreply.github.com> | 2022-09-26 10:45:35 +0200 |
commit | 3c416517b0045a27ec0bd03f285600b733dd5d1c (patch) | |
tree | ab77ad09446992f0ab81f03539c2df65e00290dd /userapi | |
parent | 8d64c24b23518fde968020e5a093564acc46235a (diff) |
Fix possible "Database is locked" issue
Diffstat (limited to 'userapi')
-rw-r--r-- | userapi/storage/shared/storage.go | 4 |
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) }) } |