summaryrefslogtreecommitdiffstats
path: root/matterbridge.go
diff options
context:
space:
mode:
Diffstat (limited to 'matterbridge.go')
-rw-r--r--matterbridge.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/matterbridge.go b/matterbridge.go
index 774a1933..cb966677 100644
--- a/matterbridge.go
+++ b/matterbridge.go
@@ -49,12 +49,11 @@ func main() {
continue
}
fmt.Printf("starting gateway %#v\n", gw.Name)
- go func(gw config.Gateway) {
- err := gateway.New(cfg, &gw)
- if err != nil {
- log.Debugf("starting gateway failed %#v", err)
- }
- }(gw)
+ g := gateway.New(cfg, &gw)
+ err := g.Start()
+ if err != nil {
+ log.Debugf("starting gateway failed %#v", err)
+ }
}
select {}
}