From 926aba38016f0206b8ed5a913f49feb2a35d8348 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 4 Jul 2019 11:36:49 +0100 Subject: [PATCH] Update registry util semantics --- rcache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcache.go b/rcache.go index cc5ca31..e2e0da3 100644 --- a/rcache.go +++ b/rcache.go @@ -97,7 +97,7 @@ func (c *cache) get(service string) ([]*registry.Service, error) { // got services && within ttl so return cache if c.isValid(services, ttl) { // make a copy - cp := registry.CopyServices(services) + cp := registry.Copy(services) // unlock the read c.RUnlock() // return servics @@ -114,7 +114,7 @@ func (c *cache) get(service string) ([]*registry.Service, error) { // cache results c.Lock() - c.set(service, registry.CopyServices(services)) + c.set(service, registry.Copy(services)) c.Unlock() return services, nil