Eliminate a data race by copying the services

This commit is contained in:
Asim 2016-04-29 19:29:24 +01:00
parent 796dba3aac
commit 67e464b34d

View File

@ -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
}