summaryrefslogtreecommitdiffstats
path: root/gateway/router.go
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-10-27 07:08:25 -0500
committermsglm <msglm@techchud.xyz>2023-10-27 07:08:25 -0500
commit032a7e0c1188d3507b8d9a9571f2446a43cf775b (patch)
tree2bd38c01bc7761a6195e426082ce7191ebc765a1 /gateway/router.go
parent56e7bd01ca09ad52b0c4f48f146a20a4f1b78696 (diff)
downloadmatterbridge-msglm-1.26.0+0.1.0.tar.gz
matterbridge-msglm-1.26.0+0.1.0.tar.bz2
matterbridge-msglm-1.26.0+0.1.0.zip
apply https://github.com/42wim/matterbridge/pull/1864v1.26.0+0.1.0
Diffstat (limited to 'gateway/router.go')
-rw-r--r--gateway/router.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/gateway/router.go b/gateway/router.go
index a0d5f402..d7df1225 100644
--- a/gateway/router.go
+++ b/gateway/router.go
@@ -75,7 +75,7 @@ func (r *Router) Start() error {
r.logger.Infof("Starting bridge: %s ", br.Account)
err := br.Connect()
if err != nil {
- e := fmt.Errorf("Bridge %s failed to start: %v", br.Account, err)
+ e := fmt.Errorf("bridge %s failed to initialize: %v", br.Account, err)
if r.disableBridge(br, e) {
continue
}
@@ -83,12 +83,23 @@ func (r *Router) Start() error {
}
err = br.JoinChannels()
if err != nil {
- e := fmt.Errorf("Bridge %s failed to join channel: %v", br.Account, err)
+ e := fmt.Errorf("bridge %s failed to join channel: %v", br.Account, err)
if r.disableBridge(br, e) {
continue
}
return e
}
+
+ if starter, ok := br.Bridger.(bridge.BridgerWithChannelDependency); ok {
+ err = starter.Start()
+ if err != nil {
+ e := fmt.Errorf("bridge %s failed to start: %v", br.Account, err)
+ if r.disableBridge(br, e) {
+ continue
+ }
+ return e
+ }
+ }
}
// remove unused bridges
for _, gw := range r.Gateways {