Skip to content

Commit

Permalink
Use escaped service instance name as map key; fixes #50
Browse files Browse the repository at this point in the history
  • Loading branch information
brutella committed Oct 22, 2024
1 parent 83585ab commit 1150e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *Cache) UpdateFrom(req *Request) (adds []*Service, rmvs []*Service) {
}
entry = newService(rr.Ptr)
adds = append(adds, entry)
c.services[entry.ServiceInstanceName()] = entry
c.services[entry.EscapedServiceInstanceName()] = entry
} else {
entry = e
}
Expand All @@ -66,7 +66,7 @@ func (c *Cache) UpdateFrom(req *Request) (adds []*Service, rmvs []*Service) {
}
entry = newService(rr.Hdr.Name)
adds = append(adds, entry)
c.services[entry.ServiceInstanceName()] = entry
c.services[entry.EscapedServiceInstanceName()] = entry
} else {
entry = e
}
Expand Down

0 comments on commit 1150e0d

Please sign in to comment.