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
1 changed files with 1 additions and 0 deletions

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}