diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2023-07-19 13:37:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 13:37:04 +0200 |
commit | 297479ea4993f00a60600232485275d2c57462fe (patch) | |
tree | 35670b8efeebcaf4caf1d482d8183c2d1fc7e6f7 /userapi/storage/sqlite3 | |
parent | a01faee17c331db76317a38dd28c1ae85e5ed1f6 (diff) |
Use pointer when passing the connection manager around (#3152)
As otherwise existing connections aren't reused.
Diffstat (limited to 'userapi/storage/sqlite3')
-rw-r--r-- | userapi/storage/sqlite3/storage.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/userapi/storage/sqlite3/storage.go b/userapi/storage/sqlite3/storage.go index 48f5c842..fc13dde5 100644 --- a/userapi/storage/sqlite3/storage.go +++ b/userapi/storage/sqlite3/storage.go @@ -29,7 +29,7 @@ import ( ) // NewUserDatabase creates a new accounts and profiles database -func NewUserDatabase(ctx context.Context, conMan sqlutil.Connections, dbProperties *config.DatabaseOptions, serverName spec.ServerName, bcryptCost int, openIDTokenLifetimeMS int64, loginTokenLifetime time.Duration, serverNoticesLocalpart string) (*shared.Database, error) { +func NewUserDatabase(ctx context.Context, conMan *sqlutil.Connections, dbProperties *config.DatabaseOptions, serverName spec.ServerName, bcryptCost int, openIDTokenLifetimeMS int64, loginTokenLifetime time.Duration, serverNoticesLocalpart string) (*shared.Database, error) { db, writer, err := conMan.Connection(dbProperties) if err != nil { return nil, err @@ -137,7 +137,7 @@ func NewUserDatabase(ctx context.Context, conMan sqlutil.Connections, dbProperti }, nil } -func NewKeyDatabase(conMan sqlutil.Connections, dbProperties *config.DatabaseOptions) (*shared.KeyDatabase, error) { +func NewKeyDatabase(conMan *sqlutil.Connections, dbProperties *config.DatabaseOptions) (*shared.KeyDatabase, error) { db, writer, err := conMan.Connection(dbProperties) if err != nil { return nil, err |