4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 16:39:24 +00:00

Bail out on samechannel gateway when a bridge fails to start

This commit is contained in:
Wim
2016-10-03 09:22:59 +02:00
parent 9ca4fe7a5e
commit 2d6ed51d94
2 changed files with 5 additions and 2 deletions

View File

@ -29,7 +29,10 @@ func New(cfg *config.Config, gateway *config.SameChannelGateway) error {
gw.Bridges = append(gw.Bridges, bridge.New(cfg, &br, c))
}
for _, br := range gw.Bridges {
br.Connect()
err := br.Connect()
if err != nil {
log.Fatalf("Bridge %s failed to start: %v", br.FullOrigin(), err)
}
for _, channel := range gw.Channels {
log.Infof("%s: joining %s", br.FullOrigin(), channel)
br.JoinChannel(channel)