mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 12:50:27 +00:00
Fix panic on empty config. Closes #386
This commit is contained in:
parent
80fcf18e24
commit
fdd5ada98c
@ -81,6 +81,7 @@ func (gw *Gateway) AddBridge(cfg *config.Bridge) error {
|
|||||||
if br == nil {
|
if br == nil {
|
||||||
br = bridge.New(cfg)
|
br = bridge.New(cfg)
|
||||||
br.Config = gw.Router.Config
|
br.Config = gw.Router.Config
|
||||||
|
br.General = &gw.General
|
||||||
// set logging
|
// set logging
|
||||||
br.Log = log.WithFields(log.Fields{"prefix": "bridge"})
|
br.Log = log.WithFields(log.Fields{"prefix": "bridge"})
|
||||||
brconfig := &bridge.Config{Remote: gw.Message, Log: log.WithFields(log.Fields{"prefix": br.Protocol}), Bridge: br}
|
brconfig := &bridge.Config{Remote: gw.Message, Log: log.WithFields(log.Fields{"prefix": br.Protocol}), Bridge: br}
|
||||||
|
Loading…
Reference in New Issue
Block a user