Eliminate a data race by copying the services
This commit is contained in:
parent
796dba3aac
commit
67e464b34d
2
selector/cache/cache.go
vendored
2
selector/cache/cache.go
vendored
@ -91,7 +91,7 @@ func (c *cacheSelector) get(service string) ([]*registry.Service, error) {
|
||||
}
|
||||
|
||||
// we didn't have any results so cache
|
||||
c.cache[service] = services
|
||||
c.cache[service] = c.cp(services)
|
||||
|
||||
return services, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user