summaryrefslogtreecommitdiffstats
path: root/matterbridge.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-11-08 23:44:16 +0100
committerWim <wim@42.be>2016-11-08 23:44:16 +0100
commit14830d9f1c4e9435ee7a15e0839876ad1f4d1a9f (patch)
tree66905e31b8a25a66d069998116376e03a5ab80b7 /matterbridge.go
parenta3dd0f1345fae3d7828ed0c82d6a7c4b610d0983 (diff)
downloadmatterbridge-msglm-14830d9f1c4e9435ee7a15e0839876ad1f4d1a9f.tar.gz
matterbridge-msglm-14830d9f1c4e9435ee7a15e0839876ad1f4d1a9f.tar.bz2
matterbridge-msglm-14830d9f1c4e9435ee7a15e0839876ad1f4d1a9f.zip
Refactor gateway
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 28a76fa1..0096b0a0 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 {}
}