mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-25 05:11:35 +00:00
Bail out when a bridge fails to start
This commit is contained in:
parent
fff6f08cb6
commit
1accee1653
@ -36,7 +36,10 @@ func New(cfg *config.Config, gateway *config.Gateway) error {
|
|||||||
gw.mapIgnores()
|
gw.mapIgnores()
|
||||||
exists = make(map[string]bool)
|
exists = make(map[string]bool)
|
||||||
for _, br := range gw.Bridges {
|
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()]...) {
|
for _, channel := range append(gw.ChannelsOut[br.FullOrigin()], gw.ChannelsIn[br.FullOrigin()]...) {
|
||||||
if exists[br.FullOrigin()+channel] {
|
if exists[br.FullOrigin()+channel] {
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user