mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
use txn writer
This commit is contained in:
parent
eff8bca32a
commit
b1c2d86cda
|
|
@ -196,7 +196,7 @@ func (d *Database) RemoveAllDevices(
|
|||
|
||||
// UpdateDeviceLastSeen updates a the last seen timestamp and the ip address
|
||||
func (d *Database) UpdateDeviceLastSeen(ctx context.Context, deviceID, ipAddr string) error {
|
||||
return sqlutil.WithTransaction(d.db, func(txn *sql.Tx) error {
|
||||
return d.writer.Do(d.db, nil, func(txn *sql.Tx) error {
|
||||
return d.devices.updateDeviceLastSeen(ctx, txn, deviceID, ipAddr)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue