From f6875bb89316652e130c59aa54792ec99e2e6d80 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 2 Mar 2022 21:35:48 -0800 Subject: [PATCH] fix: regression from refactor in AMQP notification (#14455) fixes a regression introduced in #14269 that refactored the notification registration logic, all the amqp targets however online will not be available for use anymore. fixes #14451 --- internal/config/notify/parse.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/config/notify/parse.go b/internal/config/notify/parse.go index b2e71f447..b83b327a7 100644 --- a/internal/config/notify/parse.go +++ b/internal/config/notify/parse.go @@ -138,6 +138,12 @@ func fetchSubSysTargets(ctx context.Context, cfg config.Config, } _ = newTarget.Close() } + if err = targetList.Add(newTarget); err != nil { + logger.LogIf(context.Background(), err) + if returnOnTargetError { + return targetsOffline, err + } + } } case config.NotifyESSubSys: esTargets, err := GetNotifyES(cfg[config.NotifyESSubSys], transport)