Add mdns test and fix the bug it revealed

This commit is contained in:
Asim
2016-05-01 21:21:15 +01:00
parent a53fc54b70
commit 96104aa209
2 changed files with 143 additions and 1 deletions

View File

@@ -218,10 +218,14 @@ func (m *mdnsRegistry) GetService(service string) ([]*registry.Service, error) {
continue
}
if txt.Service != service {
continue
}
s, ok := serviceMap[txt.Version]
if !ok {
s = &registry.Service{
Name: service,
Name: txt.Service,
Version: txt.Version,
Endpoints: txt.Endpoints,
}