aboutsummaryrefslogtreecommitdiff
path: root/relayapi
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-07-19 13:37:04 +0200
committerGitHub <noreply@github.com>2023-07-19 13:37:04 +0200
commit297479ea4993f00a60600232485275d2c57462fe (patch)
tree35670b8efeebcaf4caf1d482d8183c2d1fc7e6f7 /relayapi
parenta01faee17c331db76317a38dd28c1ae85e5ed1f6 (diff)
Use pointer when passing the connection manager around (#3152)
As otherwise existing connections aren't reused.
Diffstat (limited to 'relayapi')
-rw-r--r--relayapi/relayapi.go2
-rw-r--r--relayapi/storage/postgres/storage.go2
-rw-r--r--relayapi/storage/sqlite3/storage.go2
-rw-r--r--relayapi/storage/storage.go2
4 files changed, 4 insertions, 4 deletions
diff --git a/relayapi/relayapi.go b/relayapi/relayapi.go
index acabb4b2..44022749 100644
--- a/relayapi/relayapi.go
+++ b/relayapi/relayapi.go
@@ -53,7 +53,7 @@ func AddPublicRoutes(
func NewRelayInternalAPI(
dendriteCfg *config.Dendrite,
- cm sqlutil.Connections,
+ cm *sqlutil.Connections,
fedClient fclient.FederationClient,
rsAPI rsAPI.RoomserverInternalAPI,
keyRing *gomatrixserverlib.KeyRing,
diff --git a/relayapi/storage/postgres/storage.go b/relayapi/storage/postgres/storage.go
index 35c08c28..dd30c1b5 100644
--- a/relayapi/storage/postgres/storage.go
+++ b/relayapi/storage/postgres/storage.go
@@ -33,7 +33,7 @@ type Database struct {
// NewDatabase opens a new database
func NewDatabase(
- conMan sqlutil.Connections,
+ conMan *sqlutil.Connections,
dbProperties *config.DatabaseOptions,
cache caching.FederationCache,
isLocalServerName func(spec.ServerName) bool,
diff --git a/relayapi/storage/sqlite3/storage.go b/relayapi/storage/sqlite3/storage.go
index 7b46396f..69df401e 100644
--- a/relayapi/storage/sqlite3/storage.go
+++ b/relayapi/storage/sqlite3/storage.go
@@ -33,7 +33,7 @@ type Database struct {
// NewDatabase opens a new database
func NewDatabase(
- conMan sqlutil.Connections,
+ conMan *sqlutil.Connections,
dbProperties *config.DatabaseOptions,
cache caching.FederationCache,
isLocalServerName func(spec.ServerName) bool,
diff --git a/relayapi/storage/storage.go b/relayapi/storage/storage.go
index 6fce1efe..4eccd002 100644
--- a/relayapi/storage/storage.go
+++ b/relayapi/storage/storage.go
@@ -30,7 +30,7 @@ import (
// NewDatabase opens a new database
func NewDatabase(
- conMan sqlutil.Connections,
+ conMan *sqlutil.Connections,
dbProperties *config.DatabaseOptions,
cache caching.FederationCache,
isLocalServerName func(spec.ServerName) bool,