From 21849036def19cc73a4b6d343dd941583fe875f0 Mon Sep 17 00:00:00 2001 From: Abhishek K <32607604+abhishek9686@users.noreply.github.com> Date: Wed, 2 Aug 2023 22:01:41 +0530 Subject: [PATCH] don't reference host on err (#2493) --- mq/publishers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mq/publishers.go b/mq/publishers.go index 2badddb84..ac195aa34 100644 --- a/mq/publishers.go +++ b/mq/publishers.go @@ -176,7 +176,7 @@ func PublishDNSUpdate(network string, dns models.DNSUpdate) error { for _, node := range nodes { host, err := logic.GetHost(node.HostID.String()) if err != nil { - logger.Log(0, "error retrieving host for dns update", host.ID.String(), err.Error()) + logger.Log(0, "error retrieving host for dns update", node.HostID.String(), err.Error()) continue } data, err := json.Marshal(dns) @@ -370,7 +370,7 @@ func getNodeDNS(network string) []models.DNSUpdate { for _, node := range nodes { host, err := logic.GetHost(node.HostID.String()) if err != nil { - logger.Log(0, "error retrieving host for dns update", host.ID.String(), err.Error()) + logger.Log(0, "error retrieving host for dns update", node.HostID.String(), err.Error()) continue } dns.Action = models.DNSInsert