aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-05-03 17:40:56 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-05-03 17:40:56 +0100
commitb0a9e85c4a02f39880682d9d682f9cc7af13a93c (patch)
treea363278bac92892eb007a0114995ba1273c856ae /setup
parente01d1e1f5b39677e8817bda7cc946b3c8fcf9a4a (diff)
Fix bug in database global setup
Diffstat (limited to 'setup')
-rw-r--r--setup/base/base.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup/base/base.go b/setup/base/base.go
index 9b227b70..3641ad78 100644
--- a/setup/base/base.go
+++ b/setup/base/base.go
@@ -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")