From f25a0fa8c354f7f000528c98f3d4374e34aa7ea1 Mon Sep 17 00:00:00 2001 From: Skyenought Date: Tue, 26 Sep 2023 16:55:30 +0800 Subject: [PATCH] add license --- etcd/registry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etcd/registry.go b/etcd/registry.go index e2d4a5c..4d7e105 100644 --- a/etcd/registry.go +++ b/etcd/registry.go @@ -134,7 +134,7 @@ func (e *etcdRegistry) register(info *registry.Info, leaseID clientv3.LeaseID) e } ctx, cancel := context.WithTimeout(context.Background(), time.Second*3) defer cancel() - _, err = e.etcdClient.Put(ctx, serviceKey(info.ServiceName, info.Addr.String()), string(val), clientv3.WithLease(leaseID)) + _, err = e.etcdClient.Put(ctx, serviceKey(info.ServiceName, addr), string(val), clientv3.WithLease(leaseID)) return err }