aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAlex Chen <Cnly@users.noreply.github.com>2020-04-19 18:18:38 +0800
committerGitHub <noreply@github.com>2020-04-19 11:18:38 +0100
commit9f5ece8045b820d8bbb9d8e23765cb6c83b60bcc (patch)
treedd77b0da6aa110ab1243cf93746422cf298b9c99 /common
parente1a4ada0e1325cbc72814f7ac00ee56f9986e014 (diff)
Fix nil http clients provided to components in polylith mode (#973)
Signed-off-by: Alex Chen <minecnly@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/basecomponent/base.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/basecomponent/base.go b/common/basecomponent/base.go
index de3e04c2..5c6f6477 100644
--- a/common/basecomponent/base.go
+++ b/common/basecomponent/base.go
@@ -124,7 +124,7 @@ func (b *BaseDendrite) CreateHTTPRoomserverAPIs() (
if err != nil {
logrus.WithError(err).Panic("NewRoomserverInputAPIHTTP failed", b.httpClient)
}
- query, err := roomserverAPI.NewRoomserverQueryAPIHTTP(b.Cfg.RoomServerURL(), nil)
+ query, err := roomserverAPI.NewRoomserverQueryAPIHTTP(b.Cfg.RoomServerURL(), b.httpClient)
if err != nil {
logrus.WithError(err).Panic("NewRoomserverQueryAPIHTTP failed", b.httpClient)
}
@@ -134,7 +134,7 @@ func (b *BaseDendrite) CreateHTTPRoomserverAPIs() (
// CreateHTTPEDUServerAPIs returns eduInputAPI for hitting the EDU
// server over HTTP
func (b *BaseDendrite) CreateHTTPEDUServerAPIs() eduServerAPI.EDUServerInputAPI {
- e, err := eduServerAPI.NewEDUServerInputAPIHTTP(b.Cfg.EDUServerURL(), nil)
+ e, err := eduServerAPI.NewEDUServerInputAPIHTTP(b.Cfg.EDUServerURL(), b.httpClient)
if err != nil {
logrus.WithError(err).Panic("NewEDUServerInputAPIHTTP failed", b.httpClient)
}
@@ -144,7 +144,7 @@ func (b *BaseDendrite) CreateHTTPEDUServerAPIs() eduServerAPI.EDUServerInputAPI
// CreateHTTPFederationSenderAPIs returns FederationSenderQueryAPI for hitting
// the federation sender over HTTP
func (b *BaseDendrite) CreateHTTPFederationSenderAPIs() federationSenderAPI.FederationSenderQueryAPI {
- f, err := federationSenderAPI.NewFederationSenderQueryAPIHTTP(b.Cfg.FederationSenderURL(), nil)
+ f, err := federationSenderAPI.NewFederationSenderQueryAPIHTTP(b.Cfg.FederationSenderURL(), b.httpClient)
if err != nil {
logrus.WithError(err).Panic("NewFederationSenderQueryAPIHTTP failed", b.httpClient)
}