diff options
author | Wim <wim@42.be> | 2017-02-17 22:08:30 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-02-17 22:08:30 +0100 |
commit | 62b165c0b4052f96ab89c358301bf246d239eba7 (patch) | |
tree | 3c8227f1c7f3b2b83bd0ec17005e0110b34746ab /matterbridge.go | |
parent | dc3723210076d7f7fecdfbf98b5de2f4540900ea (diff) | |
download | matterbridge-msglm-62b165c0b4052f96ab89c358301bf246d239eba7.tar.gz matterbridge-msglm-62b165c0b4052f96ab89c358301bf246d239eba7.tar.bz2 matterbridge-msglm-62b165c0b4052f96ab89c358301bf246d239eba7.zip |
Refactor samechannelgateway
Diffstat (limited to 'matterbridge.go')
-rw-r--r-- | matterbridge.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/matterbridge.go b/matterbridge.go index bb125c82..32bc4285 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -36,12 +36,11 @@ func main() { continue } fmt.Printf("starting samechannel gateway %#v\n", gw.Name) - go func(gw config.SameChannelGateway) { - err := samechannelgateway.New(cfg, &gw) - if err != nil { - log.Fatalf("starting gateway failed %#v", err) - } - }(gw) + g := samechannelgateway.New(cfg, &gw) + err := g.Start() + if err != nil { + log.Fatalf("starting gateway failed %#v", err) + } } for _, gw := range cfg.Gateway { |