neighborhood: Remove an obsolete piece of code. It existed to keep us
backward compatible till we started passing endpoints in the neihgborhood
announcements.
Change-Id: I626ce647183f5ee4b9716f30ae55f5906ae36767
diff --git a/services/mounttable/lib/neighborhood.go b/services/mounttable/lib/neighborhood.go
index e5f0aa9..c146deb 100644
--- a/services/mounttable/lib/neighborhood.go
+++ b/services/mounttable/lib/neighborhood.go
@@ -182,24 +182,6 @@
for addr, deadline := range addrMap {
reply = append(reply, naming.MountedServer{addr, nil, deadline})
}
-
- if reply != nil {
- return reply
- }
-
- // If we didn't get any direct endpoints, make some up from the target and port.
- // TODO(rthellend): Do we need the code below? If we haven't received
- // any results at this point, it would seem to indicate a bug somewhere
- // because NeighborhoodServer won't start without at least one address.
- for _, rr := range si.SrvRRs {
- ips, ttl := nh.mdns.ResolveAddress(rr.Target)
- for _, ip := range ips {
- addr := net.JoinHostPort(ip.String(), strconv.Itoa(int(rr.Port)))
- ep := naming.FormatEndpoint("tcp", addr)
- deadline := vdltime.Deadline{now.Add(time.Second * time.Duration(ttl))}
- reply = append(reply, naming.MountedServer{naming.JoinAddressName(ep, ""), nil, deadline})
- }
- }
return reply
}