diff --git a/SOURCES/0003-fix-report-active-dispatchers-when-connecting-to-bro.patch b/SOURCES/0003-fix-report-active-dispatchers-when-connecting-to-bro.patch new file mode 100644 index 0000000..34fe42a --- /dev/null +++ b/SOURCES/0003-fix-report-active-dispatchers-when-connecting-to-bro.patch @@ -0,0 +1,30 @@ +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 + diff --git a/SPECS/rhc.spec b/SPECS/rhc.spec index 3991fbf..086e921 100644 --- a/SPECS/rhc.spec +++ b/SPECS/rhc.spec @@ -2,7 +2,7 @@ Name: rhc Version: 0.2.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: Message dispatch agent for cloud-connected systems License: GPLv3 @@ -14,6 +14,7 @@ Source1: config.toml # Fixed upstream Patch0: 0001-fix-Improve-output-during-disconnect.patch Patch1: 0002-feat-Include-Description-in-help-output.patch +Patch2: 0003-fix-report-active-dispatchers-when-connecting-to-bro.patch ExclusiveArch: %{go_arches} @@ -75,6 +76,9 @@ make PREFIX=%{_prefix} \ %changelog +* Fri Sep 24 2021 Link Dupont - 0.2.0-3 +- Fix an issue reporting workers on reconnect (Resolves: RHBZ#2007667) + * Thu Jul 1 2021 Link Dupont - 0.2.0-2 - Add two patches that fix some UX issues