Skip to content

Commit

Permalink
don't reference host on err
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Aug 2, 2023
1 parent 0c70c4d commit 6b7206a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mq/publishers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6b7206a

Please sign in to comment.