5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-24 17:15:40 +00:00

Fix panic on empty config. Closes #386

This commit is contained in:
Wim 2018-03-05 22:23:01 +01:00
parent 80fcf18e24
commit fdd5ada98c

View File

@ -81,6 +81,7 @@ func (gw *Gateway) AddBridge(cfg *config.Bridge) error {
if br == nil {
br = bridge.New(cfg)
br.Config = gw.Router.Config
br.General = &gw.General
// set logging
br.Log = log.WithFields(log.Fields{"prefix": "bridge"})
brconfig := &bridge.Config{Remote: gw.Message, Log: log.WithFields(log.Fields{"prefix": br.Protocol}), Bridge: br}