From 7c742868fbcb0f7fbd2d9d1e02991bbb01e2d763 Mon Sep 17 00:00:00 2001 From: Link Dupont Date: Fri, 24 Sep 2021 15:12:45 -0400 Subject: [PATCH] fix: report active dispatchers when connecting to broker Include the current dispatchers map when publishing connection status during the reconnect handler instead of always publishing an empty map. Fixes RHBZ#2007667 Signed-off-by: Link Dupont --- cmd/yggd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/yggd/main.go b/cmd/yggd/main.go index 5f0a931..4999f98 100644 --- a/cmd/yggd/main.go +++ b/cmd/yggd/main.go @@ -238,7 +238,7 @@ func main() { }) log.Tracef("subscribed to topic: %v", topic) - go publishConnectionStatus(client, map[string]map[string]string{}) + go publishConnectionStatus(client, d.makeDispatchersMap()) }) mqttClientOpts.SetDefaultPublishHandler(func(c mqtt.Client, m mqtt.Message) { log.Errorf("unhandled message: %v", string(m.Payload())) -- 2.31.1