tiny tidy-up / refactor

This commit is contained in:
Matthias Radestock
2018-01-07 08:36:23 +00:00
parent fd5fa7a962
commit f2bdbbde22

View File

@@ -82,12 +82,16 @@ func (c connectionJoin) Render(rpt report.Report) Nodes {
if !found {
id, found = ipNodes[report.MakeScopedEndpointNodeID(scope, addr, port)]
}
if found && id != "" { // not one we blanked out earlier
// We are guaranteed to find the id, so really this
// should never end up creating a node.
return id
if !found || id == "" {
return ""
}
return ""
// Not an IP we blanked out earlier.
//
// MapEndpoints is guaranteed to find a node with this id
// (and hence not have to create one), since we got the id
// from ipNodes, which is populated from c.topology, which
// is where MapEndpoints will look.
return id
}, c.topology).Render(rpt)
}