From 73247a86fd16d116a173cc11efa3b82ff55edc93 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 26 Mar 2024 00:18:42 -0400 Subject: [PATCH] fix: handle edge case where the Protocol config map has no configs, but we are creating a default configuration for a protocol. --- config/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/config.go b/config/config.go index 9685100..7950997 100644 --- a/config/config.go +++ b/config/config.go @@ -92,6 +92,10 @@ func (m *Manager) ConfigureProtocol(name string, cfg ProtocolConfig) error { return err } + if m.root.Protocol == nil { + m.root.Protocol = make(map[string]interface{}) + } + m.root.Protocol[name] = cfg return nil