mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Fix bug in database global setup
This commit is contained in:
parent
e01d1e1f5b
commit
b0a9e85c4a
1 changed files with 2 additions and 1 deletions
|
@ -201,7 +201,8 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, options ...Base
|
|||
if cfg.Global.DatabaseOptions.ConnectionString.IsSQLite() {
|
||||
logrus.Panic("Using a global database connection pool is not supported with SQLite databases")
|
||||
}
|
||||
if db, err = sqlutil.Open(&cfg.Global.DatabaseOptions, sqlutil.NewDummyWriter()); err != nil {
|
||||
writer = sqlutil.NewDummyWriter()
|
||||
if db, err = sqlutil.Open(&cfg.Global.DatabaseOptions, writer); err != nil {
|
||||
logrus.WithError(err).Panic("Failed to set up global database connections")
|
||||
}
|
||||
logrus.Debug("Using global database connection pool")
|
||||
|
|
Loading…
Reference in a new issue