mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 22:02:46 +00:00
Use pointer when passing the connection manager around (#3152)
As otherwise existing connections aren't reused.
This commit is contained in:
parent
a01faee17c
commit
297479ea49
31 changed files with 143 additions and 79 deletions
|
@ -36,7 +36,7 @@ type SyncServerDatasource struct {
|
|||
}
|
||||
|
||||
// NewDatabase creates a new sync server database
|
||||
func NewDatabase(ctx context.Context, cm sqlutil.Connections, dbProperties *config.DatabaseOptions) (*SyncServerDatasource, error) {
|
||||
func NewDatabase(ctx context.Context, cm *sqlutil.Connections, dbProperties *config.DatabaseOptions) (*SyncServerDatasource, error) {
|
||||
var d SyncServerDatasource
|
||||
var err error
|
||||
if d.db, d.writer, err = cm.Connection(dbProperties); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue