fix: handle edge case where the Protocol config map has no configs, but we are creating a default configuration for a protocol.
This commit is contained in:
parent
c9531bc588
commit
73247a86fd
|
@ -92,6 +92,10 @@ func (m *Manager) ConfigureProtocol(name string, cfg ProtocolConfig) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if m.root.Protocol == nil {
|
||||||
|
m.root.Protocol = make(map[string]interface{})
|
||||||
|
}
|
||||||
|
|
||||||
m.root.Protocol[name] = cfg
|
m.root.Protocol[name] = cfg
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue