summaryrefslogtreecommitdiffstats
path: root/gateway/gateway.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-10-01 20:07:04 +0200
committerWim <wim@42.be>2016-10-01 20:07:04 +0200
commit1accee1653e35e50c4f68124d56ce5edc2c896c4 (patch)
tree8af017cb27e35f8f4d5ed586494d71340ffd766c /gateway/gateway.go
parentfff6f08cb63cde691a3d5fb8f1c109cbdb470c58 (diff)
downloadmatterbridge-msglm-1accee1653e35e50c4f68124d56ce5edc2c896c4.tar.gz
matterbridge-msglm-1accee1653e35e50c4f68124d56ce5edc2c896c4.tar.bz2
matterbridge-msglm-1accee1653e35e50c4f68124d56ce5edc2c896c4.zip
Bail out when a bridge fails to start
Diffstat (limited to 'gateway/gateway.go')
-rw-r--r--gateway/gateway.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go
index 18ded7cd..2180f930 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -36,7 +36,10 @@ func New(cfg *config.Config, gateway *config.Gateway) error {
gw.mapIgnores()
exists = make(map[string]bool)
for _, br := range gw.Bridges {
- br.Connect()
+ err := br.Connect()
+ if err != nil {
+ log.Fatalf("Bridge %s failed to start. Exiting", br.FullOrigin())
+ }
for _, channel := range append(gw.ChannelsOut[br.FullOrigin()], gw.ChannelsIn[br.FullOrigin()]...) {
if exists[br.FullOrigin()+channel] {
continue