From 7a5a308c9b95560af24830577c6e93c8a468088a Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 14 Nov 2022 19:21:56 +0800 Subject: [PATCH] etcd conf --- pkg/grpc-etcdv3/getcdv3/register.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/grpc-etcdv3/getcdv3/register.go b/pkg/grpc-etcdv3/getcdv3/register.go index 4c18872ef..2e83e621f 100644 --- a/pkg/grpc-etcdv3/getcdv3/register.go +++ b/pkg/grpc-etcdv3/getcdv3/register.go @@ -139,12 +139,7 @@ func registerConf(key, conf string) { panic(err.Error()) } //lease - ctx, _ := context.WithCancel(context.Background()) - resp, err := cli.Grant(ctx, 10) - if err != nil { - panic(err.Error()) - } - if _, err := cli.Put(ctx, key, conf, clientv3.WithLease(resp.ID)); err != nil { + if _, err := cli.Put(context.Background(), key, conf); err != nil { fmt.Println("panic, params: ") panic(err.Error()) }